Convert more timing code to <chrono>

* LoadMonitor
* Entry
* Import
This commit is contained in:
Howard Hinnant
2017-09-28 13:38:46 -04:00
committed by seelabs
parent db17ae8997
commit 3757829f8e
14 changed files with 120 additions and 104 deletions

View File

@@ -49,7 +49,7 @@ ValidatorSite::ValidatorSite (
ValidatorSite::~ValidatorSite()
{
std::unique_lock<std::mutex> lock{state_mutex_};
if (timer_.expires_at().time_since_epoch().count())
if (timer_.expires_at() > clock_type::time_point{})
{
if (! stopping_)
{
@@ -100,7 +100,7 @@ void
ValidatorSite::start ()
{
std::lock_guard <std::mutex> lock{state_mutex_};
if (! timer_.expires_at().time_since_epoch().count())
if (timer_.expires_at() == clock_type::time_point{})
setTimer ();
}