X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTimeSource.cc;h=f5baef937a47606800549455992e078fc8d31e0c;hb=5443435c4c2b6e4386c5334b5b8358273f2bae93;hp=61b72534572c434ce10ccf0c202bf8e81048d30e;hpb=c6811d4b2fdd60eb33af627ae287dd228f435d14;p=senf.git diff --git a/Utils/Logger/TimeSource.cc b/Utils/Logger/TimeSource.cc index 61b7253..f5baef9 100644 --- a/Utils/Logger/TimeSource.cc +++ b/Utils/Logger/TimeSource.cc @@ -29,6 +29,7 @@ // Custom includes #include #include "../Exception.hh" +#include "../../Scheduler/ClockService.hh" //#include "TimeSource.mpp" #define prefix_ @@ -46,10 +47,7 @@ prefix_ senf::log::TimeSource::~TimeSource() prefix_ senf::log::time_type senf::log::SystemTimeSource::operator()() const { - struct ::timespec tm; - if (::clock_gettime(CLOCK_MONOTONIC, &tm) < 0) - SENF_THROW_SYSTEM_EXCEPTION("::clock_gettime()"); - return static_cast(tm.tv_sec)*1000000000ll+tm.tv_nsec; + return senf::ClockService::now(); } ///////////////////////////////cc.e////////////////////////////////////////