Bonsai_extra_value_stabilitymodule Bonsai := Bonsai.Contval with_last_modified_time :
equal:('a -> 'a -> bool) ->
'a Bonsai.t ->
Bonsai.graph @ local ->
'a Bonsai.t * Core.Time_ns.t Bonsai.twith_last_modified_time applies a cutoff to the input value and takes a note of the last time the value did not cutoff (in other words, the last time it was changed).
Whenever the returned computation is activated, the "last time modified" value will be reset to the current time.
val is_stable :
equal:('a -> 'a -> bool) ->
'a Bonsai.t ->
time_to_stable:Core.Time_ns.Span.t Bonsai.t ->
Bonsai.graph @ local ->
bool Bonsai.tis_stable indicates whether the input value has changed (according to equal) in the past specified time span.
val most_recent_value_satisfying :
?sexp_of_model:('a -> Core.Sexp.t) ->
equal:('a -> 'a -> bool) ->
'a Bonsai.t ->
condition:('a -> bool) ->
Bonsai.graph @ local ->
'a option Bonsai.tmodule Stability : sig ... endval value_stability :
?sexp_of_model:('a -> Core.Sexp.t) ->
equal:('a -> 'a -> bool) ->
'a Bonsai.t ->
time_to_stable:Core.Time_ns.Span.t Bonsai.t ->
Bonsai.graph @ local ->
'a Stability.t Bonsai.tvalue_stability determines whether the current value has changed recently, and also keeps track of the most recent stable value.