Monotonic clocks and OS X

I’m working on some patches to implement monotonic clocks on OS X (die gettimeofday die)

While working on that I noticed one odd thing, the test rig isn’t calling SDL_Init only SDL_VideoInit. And by doing that it bypasses the call to SDL_StartTick() that is performed in SDL_InitSubsystem ?

Before I go nuts and refactor the initialization, I’d like input on a “clean and simple way” to ensure that SDL_StartTick is always run?

Edward Rudd
OutOfOrder.cc
Skype: outoforder_cc
317-674-3296

If you’re willing to take the hit of an if statement in GetTicks(), you can
keep a static bool initializer around…On Thu, May 2, 2013 at 2:50 PM, Edward Rudd wrote:

I’m working on some patches to implement monotonic clocks on OS X (die
gettimeofday die)

While working on that I noticed one odd thing, the test rig isn’t calling
SDL_Init only SDL_VideoInit. And by doing that it bypasses the call to
SDL_StartTick() that is performed in SDL_InitSubsystem ?

Before I go nuts and refactor the initialization, I’d like input on a
"clean and simple way" to ensure that SDL_StartTick is always run?

Edward Rudd
OutOfOrder.cc
Skype: outoforder_cc
317-674-3296


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I chatted with ryan some yesterday and committed in a quick workaround. Where by basically moved some stuff around slightly just hit the initiailzer from SDL_InitSubsystems (as it was before) and hit it also from SDL_VideoInit…

But good news is we have proper monotonic time on OS X & Linux now…On May 4, 2013, at 6:09 , Sam Lantinga wrote:

If you’re willing to take the hit of an if statement in GetTicks(), you can keep a static bool initializer around…

On Thu, May 2, 2013 at 2:50 PM, Edward Rudd <@Edward_Rudd> wrote:
I’m working on some patches to implement monotonic clocks on OS X (die gettimeofday die)

While working on that I noticed one odd thing, the test rig isn’t calling SDL_Init only SDL_VideoInit. And by doing that it bypasses the call to SDL_StartTick() that is performed in SDL_InitSubsystem ?

Before I go nuts and refactor the initialization, I’d like input on a “clean and simple way” to ensure that SDL_StartTick is always run?

Edward Rudd
OutOfOrder.cc
Skype: outoforder_cc
317-674-3296


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Edward Rudd
OutOfOrder.cc
Skype: outoforder_cc
317-674-3296

Great. :)On Sat, May 4, 2013 at 8:44 AM, Edward Rudd wrote:

I chatted with ryan some yesterday and committed in a quick workaround.
Where by basically moved some stuff around slightly just hit the
initiailzer from SDL_InitSubsystems (as it was before) and hit it also from
SDL_VideoInit…

But good news is we have proper monotonic time on OS X & Linux now…

On May 4, 2013, at 6:09 , Sam Lantinga wrote:

If you’re willing to take the hit of an if statement in GetTicks(), you
can keep a static bool initializer around…

On Thu, May 2, 2013 at 2:50 PM, Edward Rudd wrote:

I’m working on some patches to implement monotonic clocks on OS X (die
gettimeofday die)

While working on that I noticed one odd thing, the test rig isn’t calling
SDL_Init only SDL_VideoInit. And by doing that it bypasses the call to
SDL_StartTick() that is performed in SDL_InitSubsystem ?

Before I go nuts and refactor the initialization, I’d like input on a
"clean and simple way" to ensure that SDL_StartTick is always run?

Edward Rudd
OutOfOrder.cc
Skype: outoforder_cc
317-674-3296


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Edward Rudd
OutOfOrder.cc
Skype: outoforder_cc
317-674-3296


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org