From 4e9bac4617cda29541d9e91d0ea77c6d925ecc64 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 9 Jul 2013 16:55:58 -0700 Subject: [PATCH] change usec timestamp returns to unsigned long long for 32 bit --- libraries/shared/src/SharedUtil.cpp | 4 ++-- libraries/shared/src/SharedUtil.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/shared/src/SharedUtil.cpp b/libraries/shared/src/SharedUtil.cpp index bdc35ff3f5..80b2270205 100644 --- a/libraries/shared/src/SharedUtil.cpp +++ b/libraries/shared/src/SharedUtil.cpp @@ -22,11 +22,11 @@ #include #endif -long long usecTimestamp(timeval *time) { +unsigned long long usecTimestamp(timeval *time) { return (time->tv_sec * 1000000 + time->tv_usec); } -long long usecTimestampNow() { +unsigned long long usecTimestampNow() { timeval now; gettimeofday(&now, NULL); return (now.tv_sec * 1000000 + now.tv_usec); diff --git a/libraries/shared/src/SharedUtil.h b/libraries/shared/src/SharedUtil.h index 2c9e1e6317..ced8c3624a 100644 --- a/libraries/shared/src/SharedUtil.h +++ b/libraries/shared/src/SharedUtil.h @@ -36,8 +36,8 @@ static const float DECIMETER = 0.1f; static const float CENTIMETER = 0.01f; static const float MILLIIMETER = 0.001f; -long long usecTimestamp(timeval *time); -long long usecTimestampNow(); +unsigned long long usecTimestamp(timeval *time); +unsigned long long usecTimestampNow(); float randFloat(); int randIntInRange (int min, int max);