WiiFlow_Lite/source/gui/Timer.h

18 lines
432 B
C
Raw Normal View History

2012-01-21 21:57:41 +01:00
#ifndef _TIMER_HPP
#define _TIMER_HPP
#include <ogc/lwp_watchdog.h>
class Timer
{
public:
Timer() { starttick = gettime(); };
~Timer() { };
float elapsed() { return (float) (gettime()-starttick)/(1000.0f*TB_TIMER_CLOCK); };
float elapsed_millisecs() { return 1000.0f*elapsed(); };
void reset() { starttick = gettime(); }
protected:
u64 starttick;
};
#endif