ObjectId constructor

ObjectId()

Creates ObjectId.

ObjectId structure:

  4 byte timestamp    5 byte process unique   3 byte counter
|<----------------->|<---------------------->|<------------>|
|----|----|----|----|----|----|----|----|----|----|----|----|
0                   4                   8                   12

Implementation

ObjectId() {
  _initialize(
    DateTime.now().millisecondsSinceEpoch,
    _processUnique,
    _getCounter(),
  );
}