Skip to content

Commit

Permalink
Do not use a 0:0 absolute timeout in timer test.
Browse files Browse the repository at this point in the history
Document that an absolute timeout of 0:0 is not supported.
  • Loading branch information
davmac314 committed Mar 8, 2018
1 parent 60960fe commit acb07a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion doc/html/timer.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ <h2>Details and Usage</h2>
is supported, be aware that it rarely makes sense to do so; the timer is not guaranteed to expire after
the specified interval (if the system clock is adjusted, the adjustment will also be applied to the
timeout). Use a timer against the <i class="code-name">MONOTONIC</i> clock if you need a specific interval
of time.</p>
of time.</p>

<p>An absolute timeout of 0:0 is not supported (some timer backends use it internally to disable the
associated system timer).</p>

<h3>Subclassing timer</h3>

Expand Down
2 changes: 1 addition & 1 deletion tests/dasynq-tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ void ftest_timers()
};

my_timer timer_1;
struct timespec timeout_1 = { .tv_sec = 0, .tv_nsec = 0 };
struct timespec timeout_1 = { .tv_sec = 0, .tv_nsec = 1 };
timer_1.add_timer(my_loop, clock_type::MONOTONIC);
timer_1.arm_timer(my_loop, timeout_1);

Expand Down

0 comments on commit acb07a0

Please sign in to comment.