chiark / gitweb /
volume_id: provide libvolume_id.a file
[elogind.git] / klibc / klibc / time.c
1 /*
2  * time.c
3  */
4
5 #include <time.h>
6 #include <sys/time.h>
7 #include <sys/syscall.h>
8
9 #ifndef __NR_time
10
11 time_t time(time_t *t)
12 {
13   struct timeval tv;
14
15   gettimeofday(&tv, NULL);
16   
17   if ( t )
18     *t = (time_t)tv.tv_sec;
19
20   return (time_t)tv.tv_sec;
21 }
22
23 #endif