Skip to content

Commit

Permalink
Fix timing measurment.
Browse files Browse the repository at this point in the history
  • Loading branch information
ASxa86 committed Jun 17, 2024
1 parent fc66f8f commit 883e5ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ auto Kernel::run() -> int
{
const auto frameStart = std::chrono::steady_clock::now();

const auto elapsed = std::chrono::steady_clock::now() - this->pimpl->start;
const auto elapsed = frameStart - this->pimpl->start;
this->pimpl->elapsed += elapsed;
this->pimpl->accumulate += elapsed;
this->pimpl->start = frameStart;
Expand All @@ -104,7 +104,7 @@ auto Kernel::run() -> int

this->pimpl->frame();

frames.emplace_back(std::chrono::steady_clock::now() - frameStart);
frames.emplace_back(elapsed);

if(frames.size() > 1000)
{
Expand Down

0 comments on commit 883e5ea

Please sign in to comment.