summaryrefslogtreecommitdiff
path: root/src/mongo/db/ttl.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-05-12 10:01:26 -0400
committerAndy Schwerin <schwerin@mongodb.com>2015-05-12 10:01:26 -0400
commit3681d3dbca85b25735fa0ec676828d1da191732d (patch)
tree5106b1e29186e92f31736278f79d39b4e1947b93 /src/mongo/db/ttl.cpp
parent9aac625685811873ffbc2d3e8d09531eff1ce10e (diff)
downloadmongo-3681d3dbca85b25735fa0ec676828d1da191732d.tar.gz
Revert "SERVER-13874 Make mongo::Milliseconds et al. aliases for equivalent stdx::chrono types."
This reverts commit 9aac625685811873ffbc2d3e8d09531eff1ce10e. Committed in error.
Diffstat (limited to 'src/mongo/db/ttl.cpp')
-rw-r--r--src/mongo/db/ttl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp
index facbb58082c..43845ffaa34 100644
--- a/src/mongo/db/ttl.cpp
+++ b/src/mongo/db/ttl.cpp
@@ -231,7 +231,7 @@ namespace mongo {
// Read the current time outside of the while loop, so that we don't expand our index
// bounds after every WriteConflictException.
- const Date_t now = Date_t::now();
+ unsigned long long now = curTimeMillis64();
long long numDeleted = 0;
int attempt = 1;
@@ -284,11 +284,10 @@ namespace mongo {
return true;
}
- const Date_t kDawnOfTime =
- Date_t::fromMillisSinceEpoch(std::numeric_limits<long long>::min());
+ const Date_t kDawnOfTime(std::numeric_limits<long long>::min());
const BSONObj startKey = BSON("" << kDawnOfTime);
const BSONObj endKey =
- BSON("" << now - Seconds(secondsExpireElt.numberLong()));
+ BSON("" << Date_t(now - (1000 * secondsExpireElt.numberLong())));
const bool endKeyInclusive = true;
// The canonical check as to whether a key pattern element is "ascending" or
// "descending" is (elt.number() >= 0). This is defined by the Ordering class.