| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
If you want a consistent framerate, relying solely on Carbon event timers isn't recommended. They might drift or miss a firing interval. If consistency is important, you could use a high-frequency Carbon event timer coupled with the Microseconds call to check the actual elapsed time. (e.g. fire the timer 120 times a second, animate at 30fps.)
On Jan 14, 2007, at 6:14 PM, Daniel Shiffman wrote:
Hello!
New to this list. I'm in the process of porting several PC application to Mac (Carbon / C++ / OpenGL). The one last piece I can't seem to solve is how to retrieve the milliseconds() from the system clock. I have an animation that needs to enforce a certain framerate. I'm using usleep() to wait between frames, but I need the milliseconds to determine how long to wait!
Any help would be greatly appreciated.
FWIW, this isn't how Carbon applications generally control animation. They use Carbon event timers set to fire at specific intervals instead.
| References: | |
| >Milliseconds (From: "Daniel Shiffman" <email@hidden>) | |
| >Re: Milliseconds (From: Laurence Harris <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.