package tezt

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezt-4.2.0.tar.bz2
md5=7878acd788ae59f1a07d0392644f0fff
sha512=b9e8ce2576b0bc65870409380edf17b88656a985ceb9a438a84f479b51d6b30740acf7b035eccf7d122bf5227611bf15e888e607dcdbb1576b4383f12314dd49

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.

OCaml

Innovation. Community. Security.