Fixed long long value in timing library to actually be long long.

This commit is contained in:
Thulinma 2016-02-29 11:51:23 +01:00
parent 463e549b4d
commit 203d7b7a67

View file

@ -65,7 +65,7 @@ void Util::sleep(int ms) {
long long Util::getNTP() { long long Util::getNTP() {
struct timespec t; struct timespec t;
clock_gettime(CLOCK_REALTIME, &t); clock_gettime(CLOCK_REALTIME, &t);
return ((((long long int)t.tv_sec) + 2208988800) << 32) + (t.tv_nsec * 4.2949); return ((((long long int)t.tv_sec) + 2208988800ll) << 32) + (t.tv_nsec * 4.2949);
} }
/// Gets the current time in milliseconds. /// Gets the current time in milliseconds.