1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/timeHandler.h
Michał W. Urbańczyk cc7be20b07 Merged most of the changes from trunk.
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.
2008-08-02 15:08:03 +00:00

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