Added Util::unixMS

This commit is contained in:
Thulinma 2020-03-12 16:23:16 +01:00
parent 5c6341a92a
commit 091926a963
2 changed files with 12 additions and 5 deletions

View file

@ -87,6 +87,12 @@ uint64_t Util::bootMS() {
return ((uint64_t)t.tv_sec) * 1000 + t.tv_nsec / 1000000;
}
uint64_t Util::unixMS(){
struct timeval t;
gettimeofday(&t, 0);
return ((uint64_t)t.tv_sec) * 1000 + t.tv_usec / 1000;
}
/// Gets the current time in microseconds.
uint64_t Util::getMicros() {
struct timespec t;