package tezt

  1. Overview
  2. Docs
Test framework for unit tests, integration tests, and regression tests

Install

dune-project
 Dependency

Authors

Maintainers

Sources

tezt-4.3.0.tar.bz2
md5=15abf8d74a268d18dd42e539f894fbe8
sha512=fb30fc561a1e77f037a4ce7eb022345ef0620fa1ac3e16bd83b7f867ef3d0c0ff676255a967d3122e7ef25b22f4b0dc01fba9fe90fe1b486e68b268ba1e9a9c9

doc/tezt.scheduler/Scheduler/Timer/index.html

Module Scheduler.TimerSource

Call functions after a given amount of time.

Timers trigger in the scheduler process, and only if they were created in the scheduler process. If a worker runs a scheduler itself, this worker does not inherit the timers from its parent scheduler.

Sourcetype t

Timers.

Sourceval on_delay : float -> (unit -> unit) -> t

Create a timer.

Usage: on_delay delay f

This causes run to trigger f () after delay seconds. This also causes run to not return until this timer has triggered, even if all tasks are done, unless the timer is canceled.

Sourceval cancel : t -> unit

Cancel a timer.

This removes the timer from the list of active timers. The function associated with the timer will not be triggered by run, and run will not wait for the timer to occur.

If the timer has already been triggered, this has no effect.

Sourceval cancel_all : unit -> unit

Cancel all active timers.