| 12345678910111213141516 |
- #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
|