Replaced Util::bootSecs implementation with CLOCK_MONOTONIC.
This commit is contained in:
parent
a56f13bf8c
commit
8f97995b1b
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||||
|
|
Loading…
Add table
Reference in a new issue