data Hlc
A hybrid logical clock stamp (§17.3): 48 bits of wall-clock milliseconds, a 16-bit counter and the node. Ordered by time, then counter, then node; serializable.
Example:
fn main() io {
let a = cluster.now()
let b = cluster.now()
print("{a < b} {a.millis() > 0}")
}Вывод
true true
@derive(Copy, Eq, Ord, Hash)
pub(api) data HlcПотокобезопасность. an immutable value.
С версии. 1.0.0-beta
Поля
pub(api) stamp: i64 |
|
pub(api) node: i64 | Number of the node that made the stamp. |
Методы
millis | () -> i64The wall-clock part, ms since the Unix epoch. |
counter | () -> i64The logical counter of the stamp |
Определено в: std/core/node.oxl:690