forked from LouieYang/caf_face_detection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimer.cpp
31 lines (25 loc) · 779 Bytes
/
Timer.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "Timer.hpp"
int64_t Timer::elapsed() const
{
return duration_cast<milliseconds>(high_resolution_clock::now() - m_begin).count();
}
int64_t Timer::elapsed_hours() const
{
return duration_cast<hours>(high_resolution_clock::now() - m_begin).count();
}
int64_t Timer::elapsed_micro() const
{
return duration_cast<microseconds>(high_resolution_clock::now() - m_begin).count();
}
int64_t Timer::elapsed_nano() const
{
return duration_cast<nanoseconds>(high_resolution_clock::now() - m_begin).count();
}
int64_t Timer::elapsed_seconds() const
{
return duration_cast<seconds>(high_resolution_clock::now() - m_begin).count();
}
int64_t Timer::elapsed_minutes() const
{
return duration_cast<minutes>(high_resolution_clock::now() - m_begin).count();
}