mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-30 15:14:18 +01:00
18 lines
432 B
C++
18 lines
432 B
C++
#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 |