Struct egui::util::History [−][src]
pub struct History<T> { /* fields omitted */ }
Expand description
This struct tracks recent values of some time series.
One use is to show a log of recent events, or show a graph over recent events.
It has both a maximum length and a maximum storage time. Elements are dropped when either max length or max age is reached.
Time difference between values can be zero, but never negative.
This can be used for things like smoothed averages (for e.g. FPS) or for smoothed velocity (e.g. mouse pointer speed). All times are in seconds.
Implementations
Total number of values seen.
Includes those that have been discarded due to max_len
or max_age
.
(time, value)
pairs
Time difference between values can be zero, but never negative.
Values must be added with a monotonically increasing time, or at least not decreasing.
Mean time difference between values in this History
.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for History<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for History<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more