From 9b2b83f99c1349d68f15e36efe36566e9cbe582a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 27 Nov 2018 00:02:31 -0800 Subject: Fix use of clock_gettime --- examples/common/alhelpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/common/alhelpers.c') diff --git a/examples/common/alhelpers.c b/examples/common/alhelpers.c index fec51e6b..5d2c6536 100644 --- a/examples/common/alhelpers.c +++ b/examples/common/alhelpers.c @@ -158,9 +158,9 @@ unsigned int altime_get(void) #if _POSIX_TIMERS > 0 struct timespec ts; - int ret = clock_gettime(CLOCK_REALTIME, ts); + int ret = clock_gettime(CLOCK_REALTIME, &ts); if(ret != 0) return 0; - cur_time = ts.ts_sec*1000 + ts.ts_nsec/1000000; + cur_time = ts.tv_sec*1000 + ts.tv_nsec/1000000; #else /* _POSIX_TIMERS > 0 */ struct timeval tv; int ret = gettimeofday(&tv, NULL); -- cgit v1.2.3