1 /*! ========================================================================
2 ** Extended Template and Library
4 ** $Id: clock,v 1.1.1.1 2005/01/04 01:31:46 darco Exp $
6 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
8 ** This package is free software; you can redistribute it and/or
9 ** modify it under the terms of the GNU General Public License as
10 ** published by the Free Software Foundation; either version 2 of
11 ** the License, or (at your option) any later version.
13 ** This package is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ** General Public License for more details.
18 ** === N O T E S ===========================================================
20 ** ========================================================================= */
22 /* === S T A R T =========================================================== */
27 /* === H E A D E R S ======================================================= */
29 #include "etl_config.h"
31 #ifdef HAVE_GETTIMEOFDAY
32 #include "_clock_gettimeofday.h"
33 #ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
34 #define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_gettimeofday
36 #ifndef ETL_CLOCK_REALTIME_DESC_CLASS
37 #define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_gettimeofday
42 #include "_clock_win32hpcount.h"
43 #ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
44 #define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_win32hpcount
46 #ifndef ETL_CLOCK_REALTIME_DESC_CLASS
47 #define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_win32hpcount
51 // If we could not find outselves a better
52 // clock description, go ahead and use the
53 // standard clock() implementation.
54 // (Better than nothing...)
55 #include "_clock_system.h"
56 #ifndef ETL_CLOCK_DEFAULT_DESC_CLASS
57 #define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_sys_clock
59 #ifndef ETL_CLOCK_PROCTIME_DESC_CLASS
60 #define ETL_CLOCK_PROCTIME_DESC_CLASS _ETL::clock_desc_sys_clock
62 #ifndef ETL_CLOCK_REALTIME_DESC_CLASS
63 #define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_sys_time
66 #include "_clock_base.h"
71 typedef _ETL::clock_base<ETL_CLOCK_DEFAULT_DESC_CLASS> clock;
72 #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS
73 #define ETL_CLOCK_PROCTIME
74 typedef clock_base<ETL_CLOCK_PROCTIME_DESC_CLASS> clock_proctime;
76 #ifdef ETL_CLOCK_REALTIME_DESC_CLASS
77 #define ETL_CLOCK_REALTIME
78 typedef clock_base<ETL_CLOCK_REALTIME_DESC_CLASS> clock_realtime;
80 #warning No realtime clock description found.
84 class clock : public _ETL::clock_base<ETL_CLOCK_DEFAULT_DESC_CLASS> { };
85 #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS
86 #define ETL_CLOCK_PROCTIME
87 class clock_proctime : public _ETL::clock_base<ETL_CLOCK_PROCTIME_DESC_CLASS> { };
89 #ifdef ETL_CLOCK_REALTIME_DESC_CLASS
90 #define ETL_CLOCK_REALTIME
91 class clock_realtime : public _ETL::clock_base<ETL_CLOCK_REALTIME_DESC_CLASS> { };
93 #warning No realtime clock description found.
101 /* === E N D =============================================================== */