remove \r
[extl.git] / extl / platform / counter / counters.h
blobde679171f77234b421be516da09d4209156ccc7a
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: counters.h
4 * Created: 08.02.17
5 * Updated: 08.05.05
7 * Brief: Platform counters library
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_PLATFORM_COUNTERS_H
13 #define EXTL_PLATFORM_COUNTERS_H
15 #ifndef __cplusplus
16 # error counters.h need be supported by c++.
17 #endif
19 /* ///////////////////////////////////////////////////////////////////////
20 * Includes
22 #include "../platform.h"
24 /* ///////////////////////////////////////////////////////////////////////
25 * Windows counters
27 #if defined(EXTL_PLATFORM_IS_WIN) && \
28 !defined(EXTL_WIN_NO_SUPPORT)
30 # ifndef EXTL_PLATFORM_WIN_TICK_COUNTER_H
31 # include "../../win/counter/tick_counter.h"
32 # endif
34 # ifndef EXTL_PLATFORM_WIN_HIGH_PERFORMANCE_COUNTER_H
35 # include "../../win/counter/highperformance_counter.h"
36 # endif
38 # ifndef EXTL_COMPILER_IS_GCC
39 # ifndef EXTL_PLATFORM_WIN_MULTIMEDIA_COUNTER_H
40 # include "../../win/counter/multimedia_counter.h"
41 # endif
42 # endif
44 # ifndef EXTL_PLATFORM_WIN_SYSTEM_TIME_COUNTER_H
45 # include "../../win/counter/systemtime_counter.h"
46 # endif
48 /* Note: no accurate */
49 # ifndef EXTL_PLATFORM_WIN_PROCESS_TIMES_COUNTER_H
50 # include "../../win/counter/processtimes_counter.h"
51 # endif
53 /* Note: no accurate */
54 # ifndef EXTL_PLATFORM_WIN_THREAD_TIMES_COUNTER_H
55 # include "../../win/counter/threadtimes_counter.h"
56 # endif
58 # if !defined(EXTL_PLATFORM_WIN_RDTSC_COUNTER_H) && \
59 defined(EXTL_INLINE_ASM_IN_INLINE_SUPPORT) && \
60 !defined(EXTL_COMPILER_IS_VECTORC) /* VECTORC: no accurate */
61 # include "../../win/counter/rdtsc_counter.h"
62 # endif
64 /* Unix counters */
65 #elif defined(EXTL_PLATFORM_IS_UNIX) && \
66 !defined(EXTL_UNIX_NO_SUPPORT)
67 # error counter.h have not be implemented.
68 #else
69 # error Unknown Platform.
70 #endif
72 /* //////////////////////////////////////////////////////////////////// */
73 #endif /* EXTL_PLATFORM_COUNTERS_H */
74 /* //////////////////////////////////////////////////////////////////// */