0 Members and 1 Guest are viewing this topic.
I think I'm doing something wrong, because SDL_GetTicks always returns 0.
Quote from: t0xic_kitt3n on January 09, 2013, 11:44:42 amI think I'm doing something wrong, because SDL_GetTicks always returns 0.Are you sure about that? Did you try printing out the value it returns? I just tried it on the emulator and seems to be working.
float floatFrameTime = (float)(time - oldTime);uart_printf("\n%u %f", time - oldTime, floatFrameTime);
Quote from: hoffa on January 09, 2013, 12:29:00 pmQuote from: t0xic_kitt3n on January 09, 2013, 11:44:42 amI think I'm doing something wrong, because SDL_GetTicks always returns 0.Are you sure about that? Did you try printing out the value it returns? I just tried it on the emulator and seems to be working.Yes, I used uart_printf and it displayed 0. Anyways, I figured out how to read the timer value directly, and that works fine. However, the frame time to floats isn't working for some reason. I used:Code: [Select]float floatFrameTime = (float)(time - oldTime);uart_printf("\n%u %f", time - oldTime, floatFrameTime);time-oldTime displays correctly, but floatFrameTime always prints 0.00.