Precise-ish timing

Hi all,

I need to implement a relatively precise timer for my current project. So far i have been using ofGetFrameNum() to set and retrieve relative time intervals. However now that I have more objects moving around the screen in a complex manner, frame rate just isn’t cutting it anymore.

Does anyone have any suggestions for timer implementation suggestions or resources?

Thanks!

Try ofGetElapsedTimeMillis(). Using time instead of frame for your animations is more reliable. Search for time based animation techniques.

Thank you, all working now! I’m a beginner and was trying to avoid using NSTimer.