[Stopwatch] start()/stop() return const &

This commit is contained in:
Alexander Karatarakis 2016-10-10 23:57:43 -07:00
parent 9e1d40e4dc
commit 1f055ef472
2 changed files with 4 additions and 4 deletions

View File

@ -14,9 +14,9 @@ namespace vcpkg
bool isRunning() const;
Stopwatch& start();
const Stopwatch& start();
Stopwatch& stop();
const Stopwatch& stop();
Stopwatch& reset();

View File

@ -18,7 +18,7 @@ namespace vcpkg
return this->m_isRunning;
}
Stopwatch& Stopwatch::start()
const Stopwatch& Stopwatch::start()
{
Checks::check_exit(!this->m_isRunning, "This stopwatch is already running.");
this->m_isRunning = true;
@ -26,7 +26,7 @@ namespace vcpkg
return *this;
}
Stopwatch& Stopwatch::stop()
const Stopwatch& Stopwatch::stop()
{
auto tick = std::chrono::high_resolution_clock::now();
Checks::check_exit(this->m_isRunning, "This stopwatch is already stopped.");