3rdparty/mshmet/src/sourceslib/chrono.h
raw| 1 | #ifdef __cplusplus |
| 2 | extern "C" { |
| 3 | #endif |
| 4 | |
| 5 | #include <time.h> |
| 6 | |
| 7 | #ifndef ON |
| 8 | #define RESET 0 |
| 9 | #define ON 1 |
| 10 | #define OFF 2 |
| 11 | #endif |
| 12 | |
| 13 | #define TIMEMAX 16 |
| 14 | #define MAXCLK ( 1073741823. / (double)CLOCKS_PER_SEC ) |
| 15 | |
| 16 | |
| 17 | typedef struct mytime { |
| 18 | double ctim,dtim; |
| 19 | time_t ptim; |
| 20 | short call; |
| 21 | } mytime; |
| 22 | |
| 23 | |
| 24 | /* prototypes */ |
| 25 | void chrono(int cmode,mytime *ptt); |
| 26 | double gttime(mytime t); |
| 27 | void tminit(mytime *t,int maxtim); |
| 28 | |
| 29 | |
| 30 | #ifdef __cplusplus |
| 31 | } |
| 32 | #endif |