package core

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

Source file core_condition.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
open! Import
open Import_time

include Condition

let phys_equal = Caml.(==)

let equal (t : t) t' = phys_equal t t'

external condition_timedwait
  : Condition.t -> Mutex.t -> float -> bool = "unix_condition_timedwait"

let timedwait cnd mtx time =
  condition_timedwait cnd mtx (Time.to_span_since_epoch time |> Time.Span.to_sec)