]>
Commit | Line | Data |
---|---|---|
9ef1c2d9 | 1 | #include <sys/times.h> |
2 | #include <sys/timeb.h> | |
3 | #include <stdio.h> | |
4 | ||
5 | #ifdef __cplusplus | |
6 | extern "C" { | |
7 | #endif | |
8 | ||
9 | void timer_(long *); | |
10 | ||
11 | #ifdef __cplusplus | |
12 | } | |
13 | #endif | |
14 | ||
15 | void timer_(long *etime){ | |
16 | struct timeb tr; | |
17 | struct tms tu; | |
18 | ftime (&tr); | |
19 | times (&tu); | |
20 | etime[0]=tu.tms_utime; | |
21 | etime[1]=tu.tms_stime; | |
22 | etime[2]=tr.time; | |
23 | etime[3]=(long) tr.millitm; | |
24 | etime[4]=(long) tr.timezone; | |
25 | } |