Module Sharp_ticker

module Sharp_ticker: sig .. end
Signals that takes value at certain times (such as every 5 minutes.)

type time_diff = Sharp_core.time 
type 'a command = 
| Once of 'a * time_diff (*
Take the value after x seconds.
*)
| Every of 'a * time_diff (*
Take the value every x seconds.
*)
| NTimes of 'a * time_diff * int (*
Take the value every x seconds n times then stops.
*)
A command that can be given to a tick manager.
val tick_manager : 'a command list ->
'a option Sharp_core.t * ('a command -> unit) * (unit -> unit)
Take a list of initial commands and return the signal, a trigger function to send new commands and a callback to stop the tick manager.
val every : time_diff -> 'a -> 'a option Sharp_core.t * (unit -> unit)
Create a signal which takes the given value every x seconds.
val last_for : time_diff -> 'a option Sharp_core.t -> 'a option Sharp_core.t
Transform a signal so that it keeps the last value for x seconds even though the underlying signal does not have a value anynore.

Note that this does not bind any events. Hence, nothing is triggered automatically after these x seconds. This signal should therefore be bound to a ticker somehow before it is connected to a function like vdom.