X-Git-Url: http://g0dil.de/git?p=senf.git;a=blobdiff_plain;f=senf%2FScheduler%2FTimerSource.cc;fp=senf%2FScheduler%2FTimerSource.cc;h=98f8f7cee47d2bf6a7e35e67e308168c2c4edca0;hp=2050eb732ec76184e750788ee33ae1e307268e3a;hb=114131e8774ab05964646992613a98dcedf92434;hpb=728c6fbeb525a2b48b927ebf17cc06ca943583b2 diff --git a/senf/Scheduler/TimerSource.cc b/senf/Scheduler/TimerSource.cc index 2050eb7..98f8f7c 100644 --- a/senf/Scheduler/TimerSource.cc +++ b/senf/Scheduler/TimerSource.cc @@ -37,7 +37,6 @@ #include TIMERFD_H_PATH #endif #include "senf/Utils/IgnoreValue.hh" -#include //#include "TimerSource.mpp" #define prefix_ @@ -94,8 +93,8 @@ senf::scheduler::detail::POSIXTimerSource::timeout(ClockService::clock_type time { if (! timeoutEnabled_ || timeout_ != timeout) { timeout_ = timeout; - if (SENF_CLOCKTYPEVAL(timeout_) <= 0) - timeout_ = SENF_INT2CLOCKTYPE(1); + if (timeout_ <= ClockService::clock_type(0)) + timeout_ = ClockService::clock_type(1); timeoutEnabled_ = true; reschedule(); } @@ -185,7 +184,7 @@ prefix_ void senf::scheduler::detail::PollTimerSource::disable() #ifdef HAVE_TIMERFD_CREATE prefix_ senf::scheduler::detail::TimerFDTimerSource::TimerFDTimerSource() - : timerfd_ (-1), timeoutEnabled_ (false), timeout_ (0) + : timerfd_ (-1), timeoutEnabled_ (false), timeout_(0) { timerfd_ = timerfd_create(CLOCK_MONOTONIC, 0); if (timerfd_ < 0) @@ -204,8 +203,8 @@ senf::scheduler::detail::TimerFDTimerSource::timeout(ClockService::clock_type ti { if (!timeoutEnabled_ || timeout_ != timeout) { timeout_ = timeout; - if (SENF_CLOCKTYPEVAL(timeout_) <= 0) - timeout_ = SENF_INT2CLOCKTYPE(1); + if (timeout_ <= ClockService::clock_type(0)) + timeout_ = ClockService::clock_type(1); timeoutEnabled_ = true; reschedule(); }