| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
"Nathan V. Roberts" <email@hidden>
I have a Java Cocoa app, a timer, that depends on the system clock>(System.currentTimeMillis()). It happens that when you awake fromsleep, for the first few seconds (about 10 on my 400 MHz Pismo), the>clock is in the past -- it ticks from the time it was put to sleep.
>And, then, suddenly, it jumps. This is just a display issue, unless
the user starts or stops the timer while the clock is in the past: if>(possibly after the user has obscured my app) both clock and timer
starts, the timer will tick normally for a few seconds and then
will jump, possibly hours or days depending on the length of sleep.>and so will be short by the amount of time the clock jumps.
If the user stops the timer, the timer will not jump with the clock,
Wouldn't it be simpler to just avoid System.currentTimeMillis() entirely,
and use a different time-base that doesn't jump? Don't "beat around the
bush" of the problem, go straight to the root of it.
| References: | |
| >Re: JNI and NSSelector (From: Greg Guerin <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.