1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00
vcmi/timeHandler.h
DjWarmonger 4653396d76 1.Support for Keymaster Tent & Borderguard, Eye & Hut of The Magi, Stables.
2.Partially done support for creature banks. ToDo: load config file, start battle with surrounding enemies
3.Attempt to increase hero exp capacity. You may ignore it at the moment.
4.Fixed negative countdown in timeHandler.
2009-08-11 07:50:29 +00:00

29 lines
631 B
C++

#ifndef __TIMEHANDLER_H__
#define __TIMEHANDLER_H__
#include <ctime>
/*
* timeHandler.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
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 clock()-mem;};
};
#endif // __TIMEHANDLER_H__