Faking Uptime

Gary L. Wade garywade at desisoftsystems.com
Wed Mar 19 11:16:04 PDT 2008


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.

>I've got a bug which manifests after 25 or so days of uptime.  
>(Probably due to a 32 bit time value rolling over.)
>
>My question is: is there a way to force Mac OS X to have 25 days of  
>uptime, so I can test this?
>
>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