4 ms·
Is clock_gettime() what you're looking for (specified in POSIX)? Although, in one embedded program of mine, when I run it fast enough it spends more time insid
by nitrogen 13y ago
Is clock_gettime() what you're looking for (specified in POSIX)?
Although, in one embedded program of mine, when I run it fast enough it spends more time inside of clock_gettime() measuring itself than it does actually running.
http://man.cx/clock_gettime http://man.cx/clock_gettime
- Scramblejams 13y agoThanks nitrogen for the link. Maybe it is, but I'm not experienced enough with time issues to know. I'm wondering what happens when your PC's crystal is a few percent slow or fast, and an NTP client applies corrections. Sure, it stays monotonic (with CLOCK_MONOTONIC), but what happens beyond that? And, is there equivalent functionality available on Windows?