diff options
author | Chris Robinson <[email protected]> | 2019-09-12 03:14:01 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-12 03:22:34 -0700 |
commit | 4c76f32ddac5145231609b1cb4f28028abed814b (patch) | |
tree | 139ec9836d367b014e17c6afc614d71338c15ff0 /examples/common/alhelpers.c | |
parent | 474d478854ef2ec46bf7b0cb6148c91b7fb8cc2c (diff) |
Avoid implicit conversions with the examples and utils
Diffstat (limited to 'examples/common/alhelpers.c')
-rw-r--r-- | examples/common/alhelpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/common/alhelpers.c b/examples/common/alhelpers.c index b387fd2d..730d2e13 100644 --- a/examples/common/alhelpers.c +++ b/examples/common/alhelpers.c @@ -159,12 +159,12 @@ int altime_get(void) struct timespec ts; int ret = clock_gettime(CLOCK_REALTIME, &ts); if(ret != 0) return 0; - cur_time = ts.tv_sec*1000 + ts.tv_nsec/1000000; + cur_time = (int)(ts.tv_sec*1000 + ts.tv_nsec/1000000); #else /* _POSIX_TIMERS > 0 */ struct timeval tv; int ret = gettimeofday(&tv, NULL); if(ret != 0) return 0; - cur_time = tv.tv_sec*1000 + tv.tv_usec/1000; + cur_time = (int)(tv.tv_sec*1000 + tv.tv_usec/1000); #endif if(!start_time) |