summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/libc/compilers/common/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c
index 63b4746618..16387148f6 100644
--- a/components/libc/compilers/common/time.c
+++ b/components/libc/compilers/common/time.c
@@ -616,8 +616,8 @@ int clock_gettime(clockid_t clockid, struct timespec *tp)
unit = clock_cpu_getres();
cpu_tick = clock_cpu_gettime();
- tp->tv_sec = ((int)(cpu_tick * unit)) / NANOSECOND_PER_SECOND;
- tp->tv_nsec = ((int)(cpu_tick * unit)) % NANOSECOND_PER_SECOND;
+ tp->tv_sec = ((long long)(cpu_tick * unit)) / NANOSECOND_PER_SECOND;
+ tp->tv_nsec = ((long long)(cpu_tick * unit)) % NANOSECOND_PER_SECOND;
}
break;
#endif