Skip to content

Commit

Permalink
#5231: Fix the return type to std::size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Aug 2, 2020
1 parent fcc1bea commit f005952
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libs/time/StopWatch.h
Expand Up @@ -33,11 +33,13 @@ class StopWatch

// Returns the seconds passed since the last call to restart()
// If restart() has never been called, this is the time since construction
double getSecondsPassed() const
std::size_t getSecondsPassed() const
{
auto endTime = _clock.now();

return std::chrono::duration_cast<std::chrono::seconds>(endTime - _start).count();
auto seconds = std::chrono::duration_cast<std::chrono::seconds>(endTime - _start).count();

return static_cast<std::size_t>(seconds);
}
};

Expand Down

0 comments on commit f005952

Please sign in to comment.