@@ -22,8 +22,7 @@ TEST_CASE("timers add/execute", "[timers]")
2222 using namespace std ::chrono_literals;
2323 zmq::timers timers;
2424 bool handler_ran = false ;
25- timers.add (
26- 4ms, [](auto , void *arg) { *(bool *) arg = true ; }, &handler_ran);
25+ timers.add (4ms, [](auto , void *arg) { *(bool *) arg = true ; }, &handler_ran);
2726 CHECK (timers.timeout ().has_value ());
2827 CHECK (!handler_ran);
2928 std::this_thread::sleep_for (10ms);
@@ -36,8 +35,8 @@ TEST_CASE("timers add/cancel", "[timers]")
3635 using namespace std ::chrono_literals;
3736 zmq::timers timers;
3837 bool handler_ran = false ;
39- auto id = timers. add (
40- 4ms, [](auto , void *arg) { *(bool *) arg = true ; }, &handler_ran);
38+ auto id =
39+ timers. add ( 4ms, [](auto , void *arg) { *(bool *) arg = true ; }, &handler_ran);
4140 CHECK (timers.timeout ().has_value ());
4241 CHECK (!handler_ran);
4342 timers.cancel (id);
@@ -51,8 +50,8 @@ TEST_CASE("timers set_interval", "[timers]")
5150 zmq::timers timers;
5251 bool handler_ran = false ;
5352 // Interval of 4 hours should never run like this
54- auto id = timers. add (
55- 4h, [](auto , void *arg) { *(bool *) arg = true ; }, &handler_ran);
53+ auto id =
54+ timers. add ( 4h, [](auto , void *arg) { *(bool *) arg = true ; }, &handler_ran);
5655 CHECK (timers.timeout ().has_value ());
5756 CHECK (!handler_ran);
5857 // Change the interval to 4ms and wait for it to timeout
@@ -67,8 +66,8 @@ TEST_CASE("timers reset", "[timers]")
6766 using namespace std ::chrono_literals;
6867 zmq::timers timers;
6968 bool handler_ran = false ;
70- auto id = timers. add (
71- 4ms, [](auto , void *arg) { *(bool *) arg = true ; }, &handler_ran);
69+ auto id =
70+ timers. add ( 4ms, [](auto , void *arg) { *(bool *) arg = true ; }, &handler_ran);
7271 CHECK (timers.timeout ().has_value ());
7372 std::this_thread::sleep_for (10ms);
7473 // Available to be executed but we reset it
0 commit comments