source:
trunk/minix/lib/ansi/clock.c@
21
| Last change on this file since 21 was 9, checked in by , 15 years ago | |
|---|---|
| File size: 195 bytes | |
| Rev | Line | |
|---|---|---|
| [9] | 1 | /* |
| 2 | * clock - determine the processor time used | |
| 3 | */ | |
| 4 | ||
| 5 | #define times _times | |
| 6 | #include <time.h> | |
| 7 | #include <sys/times.h> | |
| 8 | ||
| 9 | clock_t clock(void) | |
| 10 | { | |
| 11 | struct tms tms; | |
| 12 | ||
| 13 | times(&tms); | |
| 14 | return tms.tms_utime; | |
| 15 | } |
Note:
See TracBrowser
for help on using the repository browser.