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

18 lines
374 B
C
Raw Normal View History

2008-12-26 03:46:53 +02:00
#ifndef __TIMEHANDLER_H__
#define __TIMEHANDLER_H__
#include <ctime>
class timeHandler
{
public:
clock_t start, last, mem;
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__