AS3: Synchronize Timer event to actual time?

Posted by Nebs on Stack Overflow See other posts from Stack Overflow or by Nebs
Published on 2010-04-19T15:51:54Z Indexed on 2010/04/19 15:53 UTC
Read the original article Hit count: 231

Filed under:
|
|
|
|

I plan to use a timer event to fire every second (for a clock application).

I may be wrong, but I assume that there will probably be a (very slight) sync issue with the actual system time. For example the timer event might fire when the actual system time milliseconds are at 500 instead of 0 (meaning the seconds will be partially 'out of phase' if you will).

Is there a way to either synchronize the timer event to the real time or get some kind of system time event to fire when an second ticks in AS3?

Also if I set a Timer to fire every 1000 milliseconds, is that guaranteed or can there be some offset based on the application load?

These are probably negligible issues but I'm just curious.

Thanks.

© Stack Overflow or respective owner

Related posts about actionscript

Related posts about as3