]> git.zarvox.org Git - libtouchmouse.git/commit
Make the timeouts behave as they ought.
authorDrew Fisher <drew.m.fisher@gmail.com>
Mon, 31 Oct 2011 06:24:34 +0000 (23:24 -0700)
committerDrew Fisher <drew.m.fisher@gmail.com>
Mon, 31 Oct 2011 06:38:00 +0000 (23:38 -0700)
commit1454e47c755d10849f5871858ada83cb8d0942fd
tree778fcd5490093990e2f67ddb4f36684f8df72124
parent58feb19b4994023502a75f63b562a908b45bcfec
Make the timeouts behave as they ought.

Each platform has its own API for high resolution timers, so I added an
abstraction function that returns a monotonically increasing number in
nanoseconds.

On Windows, we use QueryPerformanceCounter()
On OSX, we use mach_absolute_time()
On Linux, we use clock_gettime() with CLOCK_MONOTONIC

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
CMakeLists.txt
src/mono_timer.c [new file with mode: 0644]
src/mono_timer.h [new file with mode: 0644]
src/touchmouse.c