Source release 14.1.0
This commit is contained in:
@@ -9,13 +9,23 @@ namespace metrics {
|
||||
class TimerMetric {
|
||||
|
||||
public:
|
||||
// Starts the clock running. If the clock was previously set, this resets it.
|
||||
// IsStarted will return true after this call.
|
||||
void Start();
|
||||
// Returns whether or not the timer has started.
|
||||
bool IsStarted() const { return is_started_; };
|
||||
// Stops the clock and clears the current value. IsStarted will return false
|
||||
// after this call.
|
||||
void Clear();
|
||||
// Returns the current clock value as milliseconds (AsMs) or microseconds
|
||||
// (AsUs).
|
||||
double AsMs() const;
|
||||
double AsUs() const;
|
||||
|
||||
private:
|
||||
double sec_;
|
||||
double usec_;
|
||||
bool is_started_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user