summaryrefslogtreecommitdiff
path: root/tools/source/datetime/ttime.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source/datetime/ttime.cxx')
-rw-r--r--tools/source/datetime/ttime.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index 0049c33efd9d..e1fdc25615d2 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -476,11 +476,12 @@ sal_uInt64 tools::Time::GetMonotonicTicks()
#if defined(USE_CLOCK_GETTIME)
struct timespec currentTime;
clock_gettime( CLOCK_MONOTONIC, &currentTime );
- nMicroSeconds = currentTime.tv_sec * 1000 * 1000 + currentTime.tv_nsec / 1000;
+ nMicroSeconds
+ = static_cast<sal_uInt64>(currentTime.tv_sec) * 1000 * 1000 + currentTime.tv_nsec / 1000;
#else
struct timeval currentTime;
gettimeofday( &currentTime, nullptr );
- nMicroSeconds = currentTime.tv_sec * 1000 * 1000 + currentTime.tv_usec;
+ nMicroSeconds = static_cast<sal_uInt64>(currentTime.tv_sec) * 1000 * 1000 + currentTime.tv_usec;
#endif
#endif // __MACH__
return nMicroSeconds;