ligo/lib_node_p2p/moving_average.mli

25 lines
860 B
OCaml
Raw Normal View History

2016-11-28 21:54:32 +01:00
(**************************************************************************)
(* *)
2017-11-14 00:36:14 +01:00
(* Copyright (c) 2014 - 2017. *)
2016-11-28 21:54:32 +01:00
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
2017-01-14 13:13:59 +01:00
type t
2016-11-28 21:54:32 +01:00
2017-01-14 13:13:59 +01:00
val create: init:int -> alpha:float -> t
val destroy: t -> unit
2016-11-28 21:54:32 +01:00
2017-01-14 13:13:59 +01:00
val add: t -> int -> unit
2016-11-28 21:54:32 +01:00
2017-01-14 13:13:59 +01:00
val on_update: (unit -> unit) -> unit
val updated: unit Lwt_condition.t
type stat = {
total: int64 ;
2017-01-14 13:13:59 +01:00
average: int ;
}
val stat: t -> stat