Module Context_mtime.Start_time

Start time

Start time for a request or task

Depends on mtime.

val k_start_time : Mtime.t Context.key

Instant at which an action was started, a request was received, etc. This can be useful for middlewares related to timing, tracing, latency statistics, etc.

val start_time : Context.t -> Mtime.t option
val start_time_exn : Context.t -> Mtime.t
  • raises Invalid_argument

    if no start time present

val with_start_time : Mtime.t -> Context.t -> Context.t
val with_start_time_now : Context.t -> Context.t