Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Socket / Protocols / DatagramSocketProtocol.cc
index fe1ec71..50c071d 100644 (file)
@@ -33,7 +33,7 @@
 
 //#include "DatagramSocketProtocol.mpp"
 #define prefix_
-///////////////////////////////cc.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
 prefix_ senf::ClockService::clock_type senf::DatagramSocketProtocol::timestamp()
     const
@@ -47,14 +47,15 @@ prefix_ senf::ClockService::clock_type senf::DatagramSocketProtocol::timestamp()
 prefix_ senf::ClockService::clock_type senf::DatagramSocketProtocol::timestamp_system()
     const
 {
+    // we use gettimeofday() here, since on some boxes the above ioctl() return bogus values.
+    // this may reduce the precision, but we only care about +/- 1ms, for now 
     struct timeval tv;
-    if (::ioctl(fd(), SIOCGSTAMP, &tv) < 0)
-        SENF_THROW_SYSTEM_EXCEPTION("");
-    return tv.tv_sec * 1000000000LL + tv.tv_usec * 1000;
+    ::gettimeofday( &tv, NULL);
+    return tv.tv_sec * 1000000000LL + tv.tv_usec * 1000LL;
 }
 
 
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 //#include "DatagramSocketProtocol.mpp"