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(){
struct sysinfo sinfo;
sysinfo(&sinfo);
return sinfo.uptime;
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
return t.tv_sec;
}
/// Gets the current time in microseconds.