source:
trunk/minix/lib/posix/gettimeofday.c@
10
Last change on this file since 10 was 9, checked in by , 13 years ago | |
---|---|
File size: 286 bytes |
Line | |
---|---|
1 | /* |
2 | gettimeofday.c |
3 | */ |
4 | |
5 | #include <sys/time.h> |
6 | #include <lib.h> |
7 | #include <time.h> |
8 | |
9 | int gettimeofday(struct timeval *_RESTRICT tp, void *_RESTRICT tzp) |
10 | { |
11 | message m; |
12 | |
13 | if (_syscall(MM, GETTIMEOFDAY, &m) < 0) |
14 | return -1; |
15 | |
16 | tp->tv_sec = m.m2_l1; |
17 | tp->tv_usec = m.m2_l2; |
18 | |
19 | return 0; |
20 | } |
21 |
Note:
See TracBrowser
for help on using the repository browser.