{
if (! timeoutEnabled_ || timeout_ != timeout) {
timeout_ = timeout;
- if (timeout_ <= 0)
- timeout_ = 1;
+ if (timeout_ <= ClockService::clock_type(0))
+ timeout_ = ClockService::clock_type(1);
timeoutEnabled_ = true;
reschedule();
}
#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)
{
if (!timeoutEnabled_ || timeout_ != timeout) {
timeout_ = timeout;
- if (timeout_ <= 0)
- timeout_ = 1;
+ if (timeout_ <= ClockService::clock_type(0))
+ timeout_ = ClockService::clock_type(1);
timeoutEnabled_ = true;
reschedule();
}