diff options
Diffstat (limited to 'lib/gettime.c')
| -rw-r--r-- | lib/gettime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gettime.c b/lib/gettime.c index f86cc4efbff..ec40ff903e1 100644 --- a/lib/gettime.c +++ b/lib/gettime.c | |||
| @@ -35,8 +35,8 @@ gettime (struct timespec *ts) | |||
| 35 | #else | 35 | #else |
| 36 | struct timeval tv; | 36 | struct timeval tv; |
| 37 | gettimeofday (&tv, NULL); | 37 | gettimeofday (&tv, NULL); |
| 38 | ts->tv_sec = tv.tv_sec; | 38 | *ts = (struct timespec) { .tv_sec = tv.tv_sec, |
| 39 | ts->tv_nsec = tv.tv_usec * 1000; | 39 | .tv_nsec = tv.tv_usec * 1000 }; |
| 40 | #endif | 40 | #endif |
| 41 | } | 41 | } |
| 42 | 42 | ||