package mirage-sleep

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Time device

This module defines a target-agnostic MirageOS sleep operation.

val ns : int64 -> unit Lwt.t

sleep_ns n blocks the current task for n nanoseconds, treating n as unsigned.

Values used by the schedulers

type t = {
  1. time : int64;
  2. mutable canceled : bool;
  3. thread : unit Lwt.u;
}

The type for a sleeping task.

val new_sleepers : unit -> t list

new_sleepers () is used by the scheduler to find at their convenience the tasks that need to be enqueued into their task set. This also empties the list of sleepers.

OCaml

Innovation. Community. Security.