summaryrefslogtreecommitdiff
path: root/src/mongo/util/clock_source.h
diff options
context:
space:
mode:
authorWaley Chen <waleycz@gmail.com>2016-04-15 16:50:55 -0400
committerWaley Chen <waleycz@gmail.com>2016-04-15 18:02:09 -0400
commitde534119c84dfd07ecf9401de94d3524268ec6fa (patch)
tree31d57cfd92a0de7a7109a48bd58d1b1e1758810b /src/mongo/util/clock_source.h
parent04f48bd5ae704d3a8df8bf7b8864d7258f4241e3 (diff)
downloadmongo-de534119c84dfd07ecf9401de94d3524268ec6fa.tar.gz
SERVER-23243 Add getPrecision to ClockSource
Diffstat (limited to 'src/mongo/util/clock_source.h')
-rw-r--r--src/mongo/util/clock_source.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/util/clock_source.h b/src/mongo/util/clock_source.h
index 6ba47e6fce3..2c6ad1b6da3 100644
--- a/src/mongo/util/clock_source.h
+++ b/src/mongo/util/clock_source.h
@@ -28,6 +28,8 @@
#pragma once
+#include "mongo/util/time_support.h"
+
namespace mongo {
class Date_t;
@@ -40,6 +42,11 @@ public:
virtual ~ClockSource() = default;
/**
+ * Returns the minimum time change that the clock can describe.
+ */
+ virtual Milliseconds getPrecision() = 0;
+
+ /**
* Returns the current wall clock time, as defined by this source.
*/
virtual Date_t now() = 0;