Use explicit casting to avoid signedness warnings

This commit is contained in:
Danny Robson 2011-09-16 22:55:56 +10:00
parent dd1a935ed4
commit 575f87747b

View File

@ -19,6 +19,8 @@
#include "time.hpp"
#include "debug.hpp"
#include <ctime>
using namespace util;
@ -29,5 +31,8 @@ util::nanoseconds (void) {
struct timespec t;
clock_gettime (CLOCK_REALTIME, &t);
return t.tv_sec * 1000000000ULL + t.tv_nsec;
check_soft (t.tv_sec > 0);
check_soft (t.tv_nsec > 0);
return static_cast<uint64_t> (t.tv_sec) * 1000000000ULL + static_cast<uint64_t> (t.tv_nsec);
}