2 /*! ========================================================================
3 ** Extended Template and Library
7 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
9 ** This package is free software; you can redistribute it and/or
10 ** modify it under the terms of the GNU General Public License as
11 ** published by the Free Software Foundation; either version 2 of
12 ** the License, or (at your option) any later version.
14 ** This package is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ** General Public License for more details.
19 ** === N O T E S ===========================================================
21 ** ========================================================================= */
23 /* === S T A R T =========================================================== */
28 /* === H E A D E R S ======================================================= */
30 #include "etl_config.h"
32 #ifdef HAVE_GETTIMEOFDAY
33 #include "_clock_gettimeofday.h"
34 #ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
35 #define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_gettimeofday
37 #ifndef ETL_CLOCK_REALTIME_DESC_CLASS
38 #define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_gettimeofday
43 #include "_clock_win32hpcount.h"
44 #ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
45 #define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_win32hpcount
47 #ifndef ETL_CLOCK_REALTIME_DESC_CLASS
48 #define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_win32hpcount
52 // If we could not find ourselves a better
53 // clock description, go ahead and use the
54 // standard clock() implementation.
55 // (Better than nothing...)
56 #include "_clock_system.h"
57 #ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
58 #define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_sys_clock
60 #ifndef ETL_CLOCK_PROCTIME_DESC_CLASS
61 #define ETL_CLOCK_PROCTIME_DESC_CLASS _ETL::clock_desc_sys_clock
63 #ifndef ETL_CLOCK_REALTIME_DESC_CLASS
64 #define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_sys_time
67 #include "_clock_base.h"
72 typedef _ETL::clock_base<ETL_CLOCK_DEFAULT_DESC_CLASS> clock;
73 #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS
74 #define ETL_CLOCK_PROCTIME
75 typedef clock_base<ETL_CLOCK_PROCTIME_DESC_CLASS> clock_proctime;
77 #ifdef ETL_CLOCK_REALTIME_DESC_CLASS
78 #define ETL_CLOCK_REALTIME
79 typedef clock_base<ETL_CLOCK_REALTIME_DESC_CLASS> clock_realtime;
81 #warning No realtime clock description found.
85 class clock : public _ETL::clock_base<ETL_CLOCK_DEFAULT_DESC_CLASS> { };
86 #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS
87 #define ETL_CLOCK_PROCTIME
88 class clock_proctime : public _ETL::clock_base<ETL_CLOCK_PROCTIME_DESC_CLASS> { };
90 #ifdef ETL_CLOCK_REALTIME_DESC_CLASS
91 #define ETL_CLOCK_REALTIME
92 class clock_realtime : public _ETL::clock_base<ETL_CLOCK_REALTIME_DESC_CLASS> { };
94 #warning No realtime clock description found.
102 /* === E N D =============================================================== */