Skip navigation links

Package net.openhft.chronicle.core.time

Supplies time providers and utilities for obtaining or setting precise wall-clock timestamps.

See: Description

Package net.openhft.chronicle.core.time Description

Supplies time providers and utilities for obtaining or setting precise wall-clock timestamps. Implementations range from simple Java wrappers to native-backed providers and tools for unique or user-defined times.
Comparison of time providers
ProviderPrecision and behaviour
SystemTimeProviderPure Java; synthesises nanoseconds using System.nanoTime and System.currentTimeMillis.
PosixTimeProviderUses native clock_gettime for high resolution.
UniqueMicroTimeProviderEnsures unique microsecond timestamps across threads using a delegate provider.
SetTimeProviderManually settable time with optional auto-increment for tests.

Quick start


 TimeProvider timeProvider = PosixTimeProvider.INSTANCE;
 long now = timeProvider.currentTimeNanos();
 
 
Skip navigation links

Copyright © 2026 Chronicle Software Ltd. All rights reserved.