// $Id$
//
-// Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Copyright (C) 2007
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
\brief ClockService inline non-template implementation */
// Custom includes
-#include "boost/date_time/posix_time/posix_time_types.hpp"
+#include <boost/date_time/posix_time/posix_time_types.hpp>
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
prefix_ senf::ClockService::clock_type senf::ClockService::clock_m(abstime_type time)
{
+ ///\fixme What happens, if base_ is changed in SIGALRM while reading it here ?
+
+ // Idea: Have *two* base values: one is written by the SIGALRM handler, the other is only
+ // Written by synchronous code. If they differ, we block signals, copy over and continue. If
+ // they transiently differ because we are reading the SIGALRM value while it is being changed
+ // this does not matter: We will then still copy it over.
+
boost::posix_time::time_duration delta (time - base_);
return clock_type( delta.ticks() )
* clock_type( 1000000000UL / boost::posix_time::time_duration::ticks_per_second() );