diff options
author | Dwight <dmerriman@gmail.com> | 2009-10-14 16:29:32 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-10-14 16:29:32 -0400 |
commit | ddcf5eeb32d0778b80f5b9538026b3631bee6917 (patch) | |
tree | 0d25093b4444c1d7393e951b5792a539a5d43a31 /util/optime.h | |
parent | d1ed8ec3b0e81a78328a492f2984de6c5b5fc764 (diff) | |
download | mongo-ddcf5eeb32d0778b80f5b9538026b3631bee6917.tar.gz |
refactor a little
Diffstat (limited to 'util/optime.h')
-rw-r--r-- | util/optime.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/optime.h b/util/optime.h index fe5bb345119..1ef6e385de4 100644 --- a/util/optime.h +++ b/util/optime.h @@ -18,6 +18,8 @@ #pragma once +#include "../db/concurrency.h" + namespace mongo { /* Operation sequence #. A combination of current second plus an ordinal value. @@ -44,6 +46,7 @@ namespace mongo { } static OpTime now() { unsigned t = (unsigned) time(0); + DEV assertInWriteLock(); if ( last.secs == t ) { last.i++; return last; |