Tidy up abstract_clock:

* Add clock_type
* Make elapsed() const
This commit is contained in:
Vinnie Falco
2015-06-30 07:19:35 -07:00
parent 874b685a83
commit 95eaf254c9
2 changed files with 3 additions and 1 deletions

View File

@@ -61,6 +61,7 @@ public:
using period = typename Clock::period;
using duration = typename Clock::duration;
using time_point = typename Clock::time_point;
using clock_type = Clock;
static bool const is_steady = Clock::is_steady;
@@ -70,7 +71,7 @@ public:
virtual time_point now() const = 0;
/** Returning elapsed ticks since the epoch. */
rep elapsed()
rep elapsed() const
{
return now().time_since_epoch().count();
}

View File

@@ -21,6 +21,7 @@
#define BEAST_CHRONO_MANUAL_CLOCK_H_INCLUDED
#include <beast/chrono/abstract_clock.h>
#include <cassert>
namespace beast {