blob: f0049177986c08eda68b0a7c13ca8f79c74180a5 (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#include "testing/testing.hpp"
#include "platform/video_timer.hpp"
#include "base/thread.hpp"
#include "base/logging.hpp"
#include "std/bind.hpp"
void incrementValue(int & i)
{
++i;
}
#ifdef OMIM_OS_MAC
UNIT_TEST(TimerTest)
{
/*
int i = 0;
VideoTimer * videoTimer = CreatePThreadVideoTimer(bind(&incrementValue, ref(i)));
LOG(LINFO, ("checking for approximately 60 cycles in second"));
videoTimer->start();
threads::Sleep(1000);
videoTimer->pause();
TEST((i >= 57) && (i <= 61), ("timer doesn't work, i=", i));
videoTimer->resume();
threads::Sleep(200);
videoTimer->stop();
videoTimer->start();
threads::Sleep(200);
videoTimer->stop();
*/
}
#endif
|