Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.htm...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: