VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
applicationStats.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4// Created by Arnis Lektauers on 11.10.2025.
5//
6#include "applicationStats.h"
7
8namespace visutwin::canvas
9{
10 void ApplicationStats::setFrameStats(double now, float dt, float ms)
11 {
12 _frame.dt = dt;
13 _frame.ms = ms;
14 if (now > _frame.timeToCountFrames) {
15 _frame.fps = _frame.fpsAccum;
16 _frame.fpsAccum = 0;
17 _frame.timeToCountFrames = now + 1000;
18 } else {
19 _frame.fpsAccum++;
20 }
21 }
22}
void setFrameStats(double now, float dt, float ms)