Faking Uptime

David Dunham dunham at mac.com
Wed Mar 19 11:46:19 PDT 2008


On 19 Mar 2008, at 11:16, Gary L. Wade wrote:

> Have you checked your code to make sure you're not converting an  
> uptime (TickCount, Microseconds, etc.) calculation into  
> milliseconds while using a signed 32-bit value?  You'll overrun a  
> signed 32-bit value when using milliseconds at around the 24-days,  
> 20-hour mark.  That would be the easiest thing to check before  
> trying to put your Mac into a time warp.


Well yes, I'm sure the bug is something like that. But I didn't spot  
anything obvious the last time I had a 25-day machine (which  
unfortunately got rebooted before I solved the bug). I'd like to be  
able to debug and see where the value gets flipped negative.

David Dunham
Voice/Fax: 206 783 7404             http://www.pensee.com/dunham/
Imagination is more important than knowledge. -- Albert Einstein



More information about the MacOSX-dev mailing list