summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/optime.cpp
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2019-03-19 22:52:39 -0400
committerMaria van Keulen <maria@mongodb.com>2019-03-21 18:26:52 -0400
commitca3e2c1a9063b5b93547c710a93ffcc440f1b32c (patch)
tree7e88a9aefe63e8814a7d40f575d99b3de91478a3 /src/mongo/db/repl/optime.cpp
parent3789c3e4f1721e4ebd9cd076339a77d505051857 (diff)
downloadmongo-ca3e2c1a9063b5b93547c710a93ffcc440f1b32c.tar.gz
SERVER-40228 Refactor OpTimeAndWallTime into new struct
Diffstat (limited to 'src/mongo/db/repl/optime.cpp')
-rw-r--r--src/mongo/db/repl/optime.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/repl/optime.cpp b/src/mongo/db/repl/optime.cpp
index b5632a21b02..0c68be9e1a8 100644
--- a/src/mongo/db/repl/optime.cpp
+++ b/src/mongo/db/repl/optime.cpp
@@ -103,6 +103,10 @@ std::ostream& operator<<(std::ostream& out, const OpTime& opTime) {
return out << opTime.toString();
}
+std::ostream& operator<<(std::ostream& out, const OpTimeAndWallTime& opTime) {
+ return out << opTime.opTime.toString() << ", " << opTime.wallTime.toString();
+}
+
void OpTime::appendAsQuery(BSONObjBuilder* builder) const {
builder->append(kTimestampFieldName, _timestamp);
if (_term == kUninitializedTerm) {