3 ms·
CLOCK_MONOTONIC is good, but it's a local clock without a defined reference. So you can't use it on the network to synchronize different computers or otherwise
by ambrop7 10y ago
CLOCK_MONOTONIC is good, but it's a local clock without a defined reference. So you can't use it on the network to synchronize different computers or otherwise communicate absolute timestamps. There should be a CLOCK_REALTIME_RAW or something that gives you the TAI time (UTC without correction for leap seconds).
- hetman 10y agoAh, I see what you mean. A standard API for synchronising non-local events would definitely make life easier.
- bonzini 10y agoLinux has CLOCK_TAI.
- ambrop7 10y agoThat's great to know. I had no idea since it's not mentioned in the man page for clock_gettime (part of the "Linux Programmer's Manual"). Apparently the man pages are out of date.