Fixed whitespace in all files (no tabs)
[senf.git] / Utils / MicroTime.hh
1 // $Id$
2 //
3 // Copyright (C) 2006 Stefan Bund <g0dil@senf.berlios.de>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the
17 // Free Software Foundation, Inc.,
18 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
20 /** \file
21     \brief MicroTime public header */
22
23 /** \defgroup time Microseconds Time
24
25     MicroTime provides extremely rudimentary support for a time data
26     type precise to 10<sup>-6</sup> seconds. Up to now, the only
27     supported members are the datatype (which just uses a 64 bit
28     integer) and the now() function to get the current UTC time in
29     microsecods since the Epoch.
30
31     \idea This thing only exists as a quick hack. We can probably make
32         use of Boost.Time or some such thing so it probably does not
33         make sense to extend this further. We should however check the
34         performance of Boost.Time since this is used heavily in the
35         Scheduler.
36  */
37
38 #ifndef HH_MicroTime_
39 #define HH_MicroTime_ 1
40
41 // Custom includes
42 #include <boost/cstdint.hpp>
43
44 //#include "MicroTime.mpp"
45 ///////////////////////////////hh.p////////////////////////////////////////
46
47 namespace senf {
48
49     /// \addtogroup time
50     /// @{
51
52     typedef boost::uint64_t MicroTime; ///< Microsecond accurent time datatype
53
54     MicroTime now(); ///< Get current UTC time with microsecond accuracy
55
56     /// @}
57
58 }
59
60 ///////////////////////////////hh.e////////////////////////////////////////
61 //#include "MicroTime.cci"
62 //#include "MicroTime.ct"
63 //#include "MicroTime.cti"
64 //#include "MicroTime.mpp"
65 #endif
66
67 \f
68 // Local Variables:
69 // mode: c++
70 // fill-column: 100
71 // c-file-style: "senf"
72 // indent-tabs-mode: nil
73 // ispell-local-dictionary: "american"
74 // End: