|
| unsigned int | secs |
| |
| bool | started {false} |
| |
| struct timespec | t = {0, 0} |
| |
◆ Invalidator()
| Invalidator::Invalidator |
( |
unsigned int |
secs | ) |
|
|
explicit |
78{
79}
unsigned int secs
Definition measure-framerate-tests.cc:32
◆ operator()()
| bool Invalidator::operator() |
( |
| ) |
|
82{
84
85 if(!
started && 0 == clock_gettime(CLOCK_REALTIME, &
t))
86 {
88 return true;
89 }
90
91 struct timespec now = {0, 0};
92 if(0 == clock_gettime(CLOCK_REALTIME, &now))
93 {
94 if(now.tv_sec >
t.tv_sec +
secs)
95 {
96 return false;
97 }
98 }
99
100 return true;
101}
struct timespec t
Definition measure-framerate-tests.cc:34
bool started
Definition measure-framerate-tests.cc:33
void invalidate()
Definition measure-framerate-callbacks.cc:98
◆ secs
| unsigned int Invalidator::secs |
|
private |
◆ started
| bool Invalidator::started {false} |
|
private |
| struct timespec Invalidator::t = {0, 0} |
|
private |
The documentation for this class was generated from the following file: