jack2 icon indicating copy to clipboard operation
jack2 copied to clipboard

One should avoid gettimeofday for purposes of timestamping.

Open MiesSuomesta opened this issue 5 years ago • 2 comments

it is possible to mis calculate time between timestamps if something/user changes system date. The monotonic time is much more safer to use for timestamp purposes.

Better to let monotonic time as default timestamp time.

MiesSuomesta avatar Jan 28 '20 00:01 MiesSuomesta

FWIW ntpd and chrony will drive you insane over this too.

Duplicated? #412

h1z1 avatar Apr 25 '21 17:04 h1z1

This PR doesn't remove the use of gettimeofday(), but actually reverts back to using it instead of clock_gettime().

Fun fact: git log -p --follow -- linux/JackLinuxTime.c shows that the gettimeofday() call in JackLinuxTime has actually always been dead code in JACK2. Everything between #ifndef HAVE_CLOCK_GETTIME and the next #else should probably just be deleted.

imaami avatar Sep 05 '23 20:09 imaami