source: trunk/minix/lib/posix/gettimeofday.c@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 286 bytes
Line 
1/*
2gettimeofday.c
3*/
4
5#include <sys/time.h>
6#include <lib.h>
7#include <time.h>
8
9int 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.