mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
11 lines
294 B
C
11 lines
294 B
C
|
#include <ctime>
|
||
|
class timeHandler
|
||
|
{
|
||
|
public:
|
||
|
clock_t start, last, mem;
|
||
|
timeHandler():start(clock()){last=0;mem=0;};
|
||
|
long getDif(){long ret=clock()-last;last=clock();return ret;};
|
||
|
void update(){last=clock();};
|
||
|
void remember(){mem=clock();};
|
||
|
long memDif(){return mem-clock();};
|
||
|
};
|