Skip to content

Commit

Permalink
Fixed timer error
Browse files Browse the repository at this point in the history
  • Loading branch information
getroot committed Dec 4, 2024
1 parent 298286e commit 9320b34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/projects/base/ovlibrary/stop_watch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ namespace ov
if (_is_valid)
{
auto current = std::chrono::high_resolution_clock::now();
auto elapsed = current - _last - _paused_duration;

return std::chrono::duration_cast<std::chrono::microseconds>(current - _last).count();
return std::chrono::duration_cast<std::chrono::microseconds>(elapsed).count();
}

return -1LL;
Expand Down

0 comments on commit 9320b34

Please sign in to comment.