MCPcopy Create free account
hub / github.com/chrxh/alien / processBackground

Method processBackground

source/Gui/StatisticsWindow.cpp:531–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531void StatisticsWindow::processBackground()
532{
533 auto timepoint = std::chrono::steady_clock::now();
534 auto duration = _lastTimepoint.has_value() ? static_cast<int>(std::chrono::duration_cast<std::chrono::milliseconds>(timepoint - *_lastTimepoint).count()) : 0;
535 if(!_lastTimepoint || duration > LiveStatisticsDeltaTime) {
536 _lastTimepoint = timepoint;
537 auto rawStatistics = _simulationFacade->getRawStatistics();
538 _histogramLiveStatistics.update(rawStatistics.histogram);
539 _timelineLiveStatistics.update(rawStatistics.timeline, _simulationFacade->getCurrentTimestep());
540 _tableLiveStatistics.update(rawStatistics.timeline);
541 }
542}
543
544namespace
545{

Callers

nothing calls this directly

Calls 3

getRawStatisticsMethod · 0.45
updateMethod · 0.45
getCurrentTimestepMethod · 0.45

Tested by

no test coverage detected