mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
cc7be20b07
Because of really huge amount of modifications here I've probably missed some minor stuff. I doubt if it's still compatible with gcc - some changes should be reapplied.
17 lines
376 B
C++
17 lines
376 B
C++
#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
|