-
Notifications
You must be signed in to change notification settings - Fork 197
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
dest.c: Use monotonic time for cups_enum_dest #1084
base: 2.4.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we need a CUPS API that returns a monotonic value, probably a double for portability.
double cupsGetClock(void);
If we back-port this to CUPS 2.4.x, we'll want to leave this as private API (_cupsGetClock
).
[master 0350eba] Add cupsGetClock API. Also in libcups repository. |
3256ace
to
8e7e192
Compare
8e7e192
to
43e3319
Compare
@michaelrsweet hmm, looks like Mac monotonic clock precision is buggy... I've looked into Mac results on current master branch and there is something wrong with MacOS test suite - I see fail for cupsGetClock(), but the CI run shows as passed:
I will try the CLOCK_MONOTONIC_RAW, if it helps MacOS... |
To no avail... here is the post I found about Mac and CLOCK_MONOTONIC https://discussions.apple.com/thread/253778121?page=2&sortBy=rank . |
Patch written by Adam Williamson.
gettimeofday()
is vulnerable to clock jumps, so it is better to useclock_gettime()
to avoid issues with libcups if system changes clock, f.e. in Live CDs.