X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FMicroTime.hh;h=c9b537c47ca4690915334585c05f003d9f80934d;hb=81ffa1c459b96dd44472bcef37e1e373934ee138;hp=d4495e1fd9fbf754b025bfe003beed03397b7c67;hpb=ac6a813d9d99f7add4e13aff7a4bcd314d5604a6;p=senf.git diff --git a/Utils/MicroTime.hh b/Utils/MicroTime.hh index d4495e1..c9b537c 100644 --- a/Utils/MicroTime.hh +++ b/Utils/MicroTime.hh @@ -1,6 +1,39 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 Stefan Bund +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/** \file + \brief MicroTime public header */ + +/** \defgroup time Microseconds Time + + MicroTime provides extremely rudimentary support for a time data + type precise to 10-6 seconds. Up to now, the only + supported members are the datatype (which just uses a 64 bit + integer) and the now() function to get the current UTC time in + microseconds since the Epoch. + + \idea This thing only exists as a quick hack. We can probably make + use of Boost.Time or some such thing so it probably does not + make sense to extend this further. We should however check the + performance of Boost.Time since this is used heavily in the + Scheduler. + */ #ifndef HH_MicroTime_ #define HH_MicroTime_ 1 @@ -13,10 +46,14 @@ namespace senf { + /// \addtogroup time + /// @{ + + typedef boost::uint64_t MicroTime; ///< Microsecond accurent time datatype - typedef boost::uint64_t MicroTime; + MicroTime now(); ///< Get current UTC time with microsecond accuracy - MicroTime now(); + /// @} } @@ -30,4 +67,10 @@ namespace senf { // Local Variables: // mode: c++ +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: