3 ms·
A minor correction: POSIX only mandates CLOCK_REALTIME and CLOCK_MONOTONIC is optional (POSIX Advanced Realtime Extensions). Linux provides both as well as CLOC
by eliteraspberrie 12y ago
A minor correction: POSIX only mandates CLOCK_REALTIME and CLOCK_MONOTONIC is optional (POSIX Advanced Realtime Extensions). Linux provides both as well as CLOCK_MONOTONIC_RAW, and some BSD like FreeBSD provide CLOCK_MONOTONIC_PRECISE.
For OS X, use mach_absolute_time, described here: https://developer.apple.com/library/mac/qa/qa1398/_index.html https://developer.apple.com/library/mac/qa/qa1398/_index.htm...