Replaced Util::bootSecs implementation with CLOCK_MONOTONIC.

This commit is contained in:
Thulinma 2014-06-17 11:17:29 +02:00
parent a56f13bf8c
commit 8f97995b1b

View file

@ -50,9 +50,9 @@ long long int Util::getMS(){
} }
long long int Util::bootSecs(){ long long int Util::bootSecs(){
struct sysinfo sinfo; struct timespec t;
sysinfo(&sinfo); clock_gettime(CLOCK_MONOTONIC, &t);
return sinfo.uptime; return t.tv_sec;
} }
/// Gets the current time in microseconds. /// Gets the current time in microseconds.