Skip to content

Commit

Permalink
Fix compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiangrimberg committed Apr 8, 2024
1 parent b6e8830 commit 1f50b12
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion palace/utils/timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,14 @@ class Timer
// Record a timing step by adding a duration, without lapping; optionally, count it.
Duration MarkTime(Index idx, Duration time, bool count_it = true)
{
data[idx] = time + ((idx != Timer::TOTAL) ? data[idx] : 0.0);
if (idx == Timer::TOTAL)
{
data[idx] = time;
}
else
{
data[idx] += time;
}
counts[idx] += count_it;
return data[idx];
}
Expand Down

0 comments on commit 1f50b12

Please sign in to comment.