Upgrade to gcc-4.9.2
[akaros.git] / tools / compilers / gcc-glibc / glibc-2.14.1-ros / sysdeps / akaros / time.c
1 #include <time.h>
2 #include <sys/time.h>
3
4 time_t
5 time(time_t* p)
6 {
7   struct timeval t;
8   int ret = gettimeofday(&t,0);
9   if(ret == -1)
10     return (time_t)-1;
11
12   time_t ti = t.tv_sec;
13   if(p)
14     *p = ti;
15   return ti;
16 }
17 libc_hidden_def(time)