X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FMicroTime.hh;h=0d04900dec65ef92d7dcdc6ebd59f9930cc8015f;hb=553781d9e9bce316dca24ac4f0c42e5613e849e0;hp=d4495e1fd9fbf754b025bfe003beed03397b7c67;hpb=ac6a813d9d99f7add4e13aff7a4bcd314d5604a6;p=senf.git diff --git a/Utils/MicroTime.hh b/Utils/MicroTime.hh index d4495e1..0d04900 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 + microsecods 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 @@ -12,11 +45,15 @@ ///////////////////////////////hh.p//////////////////////////////////////// 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(); + /// @} }