Interpreting timestamp value
Moderator: Moderators
Interpreting timestamp value
I would like to ignore SpaceNavigator events if they are stale, however clock_get_uptime seems to be a kernel function with no userland equivalent. How do I interpret the timestamp value in a Cocoa app and compare it with the current time?
Hi all,
quick question in response to the previous posting: are you taking into account that mach_absolute_time is CPU dependent? This is not really a clock... so I am wondering if this wouldn't create problems on Intel vs. PPC Macs where mach_absolute_time behaves differently if you're relying on a constant threshold when discarding events...
Best wishes
--smb
quick question in response to the previous posting: are you taking into account that mach_absolute_time is CPU dependent? This is not really a clock... so I am wondering if this wouldn't create problems on Intel vs. PPC Macs where mach_absolute_time behaves differently if you're relying on a constant threshold when discarding events...
Best wishes
--smb
Yeah, you'd normally want to normalize the value you get back from mach_absolute_time before using it to measure elapsed time. Here's a note from apple http://developer.apple.com/qa/qa2004/qa1398.html
-
- Posts: 20
- Joined: Tue Mar 11, 2008 10:36 pm