The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

0

A principal failing in your code is the use of time(). This returns a value in seconds, so your loop might last from 4 to 5 seconds. Instead you should use gettimeofday() which provides a microseconds field (though the resolution might be worse than that). You might also reduce variability by making your process a real-time process. Use chrt -f to run your ...


0

While the statements might operate at a constant number of clock cycles for each loop, there is no guarantee that they will have a constant clock time for execution. There are any number of other things which the kernel must address, using clock cycles which your loop will not have available. Updating the system clock, checking for other processes to run, ...


4

If a .service unit will be executed from a .timer unit, it can't have RemainAfterExit=true. The systemd documentation mentions that: Note that in case the unit to activate is already active at the time the timer elapses it is not restarted, but simply left running. There is no concept of spawning new service instances in this case. Due to this, ...


Top 50 recent answers are included