Pass and use time_point in DecayingSample ctor (RIPD-359)

Switches a number of places in Resource::Logic to use abstract_clock::now()
which returns a time_point.  Unfortunately Resource::Logic tracks time
locally also, but with ints, not time_point.  So Resource::Logic uses a
delicate mix of abstract_clock::now() and abstract_clock::elapsed() with
this commit.  That inconsistency could be addressed in a second commit.
This commit is contained in:
Scott Schurr
2014-07-09 20:16:43 -07:00
committed by Vinnie Falco
parent d7e08f96a5
commit 9fb09d3109
8 changed files with 152 additions and 83 deletions

View File

@@ -26,10 +26,10 @@ class ManagerImp
: public Manager
, public beast::Thread
{
public:
private:
beast::Journal m_journal;
Logic m_logic;
public:
ManagerImp (beast::insight::Collector::ptr const& collector,
beast::Journal journal)
: Thread ("Resource::Manager")
@@ -63,7 +63,7 @@ public:
{
return m_logic.exportConsumers();
}
void importConsumers (std::string const& origin, Gossip const& gossip)
{
m_logic.importConsumers (origin, gossip);