(at tl time)
(at tl time default)
Returns the value of a timeline at a specified time, or nil if there is no value available
Returns the value of a timeline at a specified time, or nil if there is no value available
(end timeline)
Returns the time of the last event in the timeline, or nil if there are no events.
Returns the time of the last event in the timeline, or nil if there are no events.
(log tl value)
(log tl time value)
(log tl time value & more-values)
Adds value to a timeline. If time is omitted, uses the current system time.
Will always add a new event, even if this does not change the value.
Adds value to a timeline. If time is omitted, uses the current system time. Will always add a new event, even if this does not change the value.
(log-change tl value)
(log-change tl time value)
(log-change tl time value & more-values)
Logs a value to a timeline if and only if the value is a change to the previous value. This has the effect of collapsing identically values events into the first such event.
This should be used if the purpose of the timeline is purely to log changes in the value, and the presence of events is otheriwise not important.
Logs a value to a timeline if and only if the value is a change to the previous value. This has the effect of collapsing identically values events into the first such event. This should be used if the purpose of the timeline is purely to log changes in the value, and the presence of events is otheriwise not important.
(resample timeline & {:keys [start end interval events add-last]})
Resamples a timeline, logging all values at regular intervals
Must provide either desired number of events or the sampling interval.
Resamples a timeline, logging all values at regular intervals Must provide either desired number of events or the sampling interval.
(seek tl time)
Returns the index of the last event before the specified time, or nil if no such event exists
Returns the index of the last event before the specified time, or nil if no such event exists
(slice timeline start)
(slice timeline start end)
Slices a timeline from the start time (inclusive) to the end time (exclusive).
Slices a timeline from the start time (inclusive) to the end time (exclusive).
(slice-indexes timeline start-index)
(slice-indexes timeline start-index end-index)
Slices a timeline from the start index (inclusive) to the end index (exclusive).
Slices a timeline from the start index (inclusive) to the end index (exclusive).
(start timeline)
Returns the time of the first event in the timeline, or nil if there are no events.
Returns the time of the first event in the timeline, or nil if there are no events.
(timeline)
(timeline events)
Constructs a new timeline object. events may be a sequence of timestamp/value pairs or a map of timestamps to values. Events do not need to be in sorted order.
Constructs a new timeline object. events may be a sequence of timestamp/value pairs or a map of timestamps to values. Events do not need to be in sorted order.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close