mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Tidy up abstract_clock:
* Add clock_type * Make elapsed() const
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#define BEAST_CHRONO_MANUAL_CLOCK_H_INCLUDED
|
||||
|
||||
#include <beast/chrono/abstract_clock.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user