const classafBson::Timestamp
sys::Obj afBson::Timestamp
(BSON Type) - Timestamps are used internally by MongoDB's replication. You can see them in their natural habitat by querying local.main.$oplog.
- increment
const Int incrementThe increment value.
- main
- makeTimestamp
new makeTimestamp(Int seconds, Int increment)Creates a BSON Timestamp instance.
- now
static Timestamp now()Returns a unique
Timestamprepresenting now.- seconds
const Int secondsThe number of seconds since the UNIX epoch.
- toJs
Str toJs()Returns a Mongo Shell compliant, JavaScript representation of the
Timestamp. Example:timestamp.toJs
// --> Timestamp(1476290079, 4)