Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One should avoid gettimeofday for purposes of timestamping. #543

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MiesSuomesta
Copy link

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.

cause 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.
@h1z1
Copy link

h1z1 commented Apr 25, 2021

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

Duplicated? #412

@imaami
Copy link
Contributor

imaami commented Sep 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants