Folds new_value into a smoothed value, one factor per smoothing speed.
update :: (s: *History_Scalar, new_value: float64, k_array: [] float64)
Parameters
- s: *History_Scalar
- new_value: float64
- k_array: [] float64
update :: (record_data: bool)
Ends the current frame. Call it once per frame, outside every zone you opened with zone_begin.
The frame's times are filed in the history and the counters start again at zero, so the
report then shows this frame and the smoothed past. With record_data false the clocks are
read but the history is left alone, as when a frame should not count (a paused game).
Parameters
- record_data: bool
#import "Iprof"(IMPORT_MODE = .CLIENT, MANUAL_MODE = true, USE_GRAPHICS = false, DO_HISTORY = false);
main :: () {
Prof_init_highlevel();
zones[0].name = "frame";
zones[0].initted = true;
for 1..5 {
zone_begin(0);
zone_end();
update(true);
}
assert(create_report().records.count == 1);
}Doesn't run in the browser (skipped on wasm).