libCom: Add a High-Resolution Time Provider on MacOS

Since Apple don't support clock_gettime(CLOCK_REALTIME) I added a
new time provider that uses the Mach kernel Clock service to get
nanosecond resolution time.
This commit is contained in:
Andrew Johnson
2013-03-13 14:48:34 -05:00
parent c767958539
commit 738b8ca55f
3 changed files with 97 additions and 1 deletions

View File

@@ -13,6 +13,16 @@
<!-- Insert new items immediately below here ... -->
<h4>High-Resolution Time Provider on MacOS</h4>
<p>MacOS does not provide the clock_gettime() API with CLOCK_REALTIME that other
Posix systems implement, so we previously used gettimeofday() to fetch the
current date & time from the OS. That older routine only provides the time with
a resolution of 1 microsecond though, whereas clock_gettime() gives results with
a nanosecond resolution. This release uses a new MachTime time provider on
MacOS which uses the Mach Kernel's CALENDAR_CLOCK service to fetch the time, and
provides nanosecond resolution.</p>
<h4>Time drift in periodic scans</h4>
<p>The implementation of the periodic scan code has been modified to remove