@ -17,6 +17,8 @@ TODO: maybe allow events = 0 for io watchers
work with older libev versions as well but was not officially
- do not wake up every minute when timerfd is used to detect timejumps.
- do not wake up every minute when periodics are disabled and we have
a monotonic clock.
- support a lot more "uncommon" compile time configurations,
such as ev_embed enabled but ev_timer disabled.
- use a start/stop wrapper class to reduce code duplication in
@ -1,7 +1,7 @@
* libev simple C++ wrapper classes
* Copyright (c) 2007,2008,2010,2018 Marc Alexander Lehmann <email@example.com>
* Copyright (c) 2007,2008,2010,2018,2020 Marc Alexander Lehmann <firstname.lastname@example.org>
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modifica-
@ -3045,7 +3045,9 @@ timerfdcb (EV_P_ ev_io *iow, int revents)
now_floor = EV_TS_CONST (0.);
time_update (EV_A_ EV_TSTAMP_HUGE);
@ -4097,6 +4099,12 @@ ev_run (EV_P_ int flags)
if (ecb_expect_true (timerfd >= 0))
waittime = EV_TS_CONST (MAX_BLOCKTIME2);
/* without periodics but with monotonic clock there is no need */
/* for any time jump detection, so sleep longer */
if (ecb_expect_true (have_monotonic))
@ -1655,8 +1655,9 @@ Most members are additionally marked with either I<[read-only]>, meaning
that, while the watcher is active, you can look at the member and expect
some sensible content, but you must not modify it (you can modify it while
the watcher is stopped to your hearts content), or I<[read-write]>, which
means you can expect it to have some sensible content while the watcher
is active, but you can also modify it. Modifying it may not do something
means you can expect it to have some sensible content while the watcher is
active, but you can also modify it (within the same thread as the event
loop, i.e. without creating data races). Modifying it may not do something
sensible or take immediate effect (or do anything at all), but libev will
not crash or malfunction in any way.