diff options
| author | weety <[email protected]> | 2016-06-01 14:07:47 +0800 |
|---|---|---|
| committer | weety <[email protected]> | 2016-06-01 14:07:47 +0800 |
| commit | 0af00b9ce5104b66a328b45d27ab23d57ea11251 (patch) | |
| tree | cba311ed9c5511062580d01d14eeb68b0d2c9536 /components/libc | |
| parent | 11413896d37029043b33e2900683d4740275df10 (diff) | |
fixed time unit error in clock_gettime.
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/pthreads/clock_time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/libc/pthreads/clock_time.c b/components/libc/pthreads/clock_time.c index 06227e17e7..072ab84f10 100644 --- a/components/libc/pthreads/clock_time.c +++ b/components/libc/pthreads/clock_time.c @@ -112,7 +112,7 @@ int clock_gettime(clockid_t clockid, struct timespec *tp) tick = rt_tick_get(); tp->tv_sec = _timevalue.tv_sec + tick / RT_TICK_PER_SECOND; - tp->tv_nsec = (_timevalue.tv_usec + (tick % RT_TICK_PER_SECOND) * NANOSECOND_PER_TICK) * 1000; + tp->tv_nsec = (_timevalue.tv_usec + (tick % RT_TICK_PER_SECOND) * MICROSECOND_PER_TICK) * 1000; return 0; } |
