package mirage

  1. Overview
  2. Docs
The MirageOS library operating system

Install

Dune Dependency

Authors

Maintainers

Sources

mirage-4.7.0.tbz
sha256=ade8c410b2de3997c4a513f53f6c990dac6af508161e20df01b64fa7975ca5be
sha512=42fddf09be84c4251417145b88d4f63b41db1b29c9622b2b4e4508e31146f227a16875e670da96251208745f79a42f0b7d2bd8b44b883a705381b4c97a4255b8

doc/src/mirage.devices/time.ml.html

Source file time.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
open Functoria.DSL

type time = TIME

let time = typ TIME

let default_time =
  let unix_time =
    impl ~packages:[ package "mirage-time" ] "Unix_os.Time" time
  in
  let solo5_time =
    impl ~packages:[ package "mirage-time" ] "Solo5_os.Time" time
  in
  let xen_time = impl ~packages:[ package "mirage-time" ] "Xen_os.Time" time in
  match_impl
    Key.(value target)
    [
      (`Unix, unix_time);
      (`MacOSX, unix_time);
      (`Xen, xen_time);
      (`Qubes, xen_time);
      (`Virtio, solo5_time);
      (`Hvt, solo5_time);
      (`Spt, solo5_time);
      (`Muen, solo5_time);
      (`Genode, solo5_time);
    ]
    ~default:unix_time
OCaml

Innovation. Community. Security.