remove \r
[extl.git] / extl / win / counter / unit_test / rdtsc_counter_test.h
blob9605544f189f993d55504dc166faeca6bcab83d1
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: rdtsc_counter_test.h
4 * Created: 08.02.17
5 * Updated: 08.05.06
7 * Brief: Unit-testing
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_PLATFORM_WIN_RDTSC_COUNTER_TEST_H
13 #define EXTL_PLATFORM_WIN_RDTSC_COUNTER_TEST_H
15 #ifndef EXTL_PLATFORM_WIN_RDTSC_COUNTER_H
16 # error This file must be included of rdtsc_counter.h
17 #endif
19 /* ///////////////////////////////////////////////////////////////////////
20 * ::unit_test namespace
22 EXTL_TEST_BEGIN_NAMESPACE
24 /* ///////////////////////////////////////////////////////////////////////
25 * Unit-testing
27 struct rdtsc_counter_test
29 rdtsc_counter_test()
31 rdtsc_counter counter;
32 counter.begin();
33 Sleep(100);
34 counter.end();
35 EXTL_TEST_TRACE(_T("/* //////////////////////////////////////////////////////////////////// */"));
36 EXTL_TEST_TRACE(_T("rdtsc_counter Test(10ms):\n"));
37 EXTL_TEST_TRACE(_T("Count: %u"), static_cast<e_uint32_t>(counter.count()));
41 rdtsc_counter_test g_rdtsc_counter_test;
43 /* ///////////////////////////////////////////////////////////////////////
44 * ::unit_test namespace
46 EXTL_TEST_END_NAMESPACE
48 /* //////////////////////////////////////////////////////////////////// */
49 #endif /* EXTL_PLATFORM_WIN_RDTSC_COUNTER_TEST_H */
50 /* //////////////////////////////////////////////////////////////////// */