mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
118c917a60
dorobienie ifndefów w niektórych plikach .h (dlaczego ty ich nie robisz???)
16 lines
368 B
C++
16 lines
368 B
C++
#ifndef TIMEHANDLER_H
|
|
#define TIMEHANDLER_H
|
|
|
|
#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();};
|
|
};
|
|
|
|
#endif //TIMEHANDLER_H
|