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(){
|
||||
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.
|
||||
|
|
Loading…
Add table
Reference in a new issue