OxL Справочник OxL
РусскийEnglish

method Hlc.counter

The logical counter of the stamp: distinguishes events of the same millisecond.

Example:

oxl✓ проверяется в CI
fn main() io {
  let a = cluster.now()
  let b = cluster.now()
  print("{a.millis() != b.millis() || a.counter() < b.counter()}")
}
Вывод
true
pub(api) fn counter() -> i64

Сложность. O(1).

С версии. 1.0.0-beta

Возвращает

i64

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/node.oxl:728

См. также