1 /* ///////////////////////////////////////////////////////////////////////
2 * File: threadtimes_counter_test.h
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_PLATFORM_WINDOWS_THREAD_TIMES_COUNTER_TEST_H
13 #define EXTL_PLATFORM_WINDOWS_THREAD_TIMES_COUNTER_TEST_H
15 /* ///////////////////////////////////////////////////////////////////////
18 EXTL_WINDOWS_BEGIN_WHOLE_NAMESPACE
19 EXTL_TEST_NAME_BEGIN_NAMESPACE(threadtimes_counter_test
)
21 /* ///////////////////////////////////////////////////////////////////////
24 struct threadtimes_counter_test
26 threadtimes_counter_test()
28 threadtimes_counter counter
;
32 EXTL_TEST_TRACE(_T("/* //////////////////////////////////////////////////////////////////// */"));
33 EXTL_TEST_TRACE(_T("threadtimes_counter Test(100ms):\n"));
34 EXTL_TEST_TRACE(_T("Count: %u"), static_cast<e_uint32_t
>(counter
.count()));
35 EXTL_TEST_TRACE(_T("Seconds: %u"), static_cast<e_uint32_t
>(counter
.s()));
36 EXTL_TEST_TRACE(_T("MS: %u"), static_cast<e_uint32_t
>(counter
.ms()));
37 EXTL_TEST_TRACE(_T("US: %u\n"), static_cast<e_uint32_t
>(counter
.us()));
39 EXTL_TEST_TRACE(_T("Kernel Count: %u"), static_cast<e_uint32_t
>(counter
.kernel_count()));
40 EXTL_TEST_TRACE(_T("Kernel Seconds: %u"), static_cast<e_uint32_t
>(counter
.kernel_s()));
41 EXTL_TEST_TRACE(_T("Kernel MS: %u"), static_cast<e_uint32_t
>(counter
.kernel_ms()));
42 EXTL_TEST_TRACE(_T("Kernel US: %u\n"), static_cast<e_uint32_t
>(counter
.kernel_us()));
44 EXTL_TEST_TRACE(_T("User Count: %u"), static_cast<e_uint32_t
>(counter
.user_count()));
45 EXTL_TEST_TRACE(_T("User Seconds: %u"), static_cast<e_uint32_t
>(counter
.user_s()));
46 EXTL_TEST_TRACE(_T("User MS: %u"), static_cast<e_uint32_t
>(counter
.user_ms()));
47 EXTL_TEST_TRACE(_T("User US: %u"), static_cast<e_uint32_t
>(counter
.user_us()));
51 threadtimes_counter_test g_threadtimes_counter_test
;
53 /* ///////////////////////////////////////////////////////////////////////
56 EXTL_TEST_NAME_END_NAMESPACE(threadtimes_counter_test
)
57 EXTL_WINDOWS_END_WHOLE_NAMESPACE
59 /* //////////////////////////////////////////////////////////////////// */
60 #endif /* EXTL_PLATFORM_WINDOWS_THREAD_TIMES_COUNTER_TEST_H */
61 /* //////////////////////////////////////////////////////////////////// */