A signal could interrupt the measurement code and thus the measurement is not atomic, leading to possibly slightly wrong results.
We should replace the use of a signal handler and usleep with sigtimedwait, which allows us to have a single loop that handles both the signals and the measurement.
A signal could interrupt the measurement code and thus the measurement is not atomic, leading to possibly slightly wrong results.
We should replace the use of a signal handler and
usleep
withsigtimedwait
, which allows us to have a single loop that handles both the signals and the measurement.