1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-02 09:02:03 +02:00
vcmi/timeHandler.h

17 lines
376 B
C
Raw Normal View History

#ifndef TIMEHANDLER_H
#define TIMEHANDLER_H
#include <ctime>
class timeHandler
{
public:
clock_t start, last, mem;
2008-06-14 13:20:18 +03:00
timeHandler():start(clock()){last=clock();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();};
};
#endif //TIMEHANDLER_H