Getting Started
Install the daemon, read bounded time
ClockBound has two parts: the clockbound daemon that keeps the clock synchronized and publishes a bounded timestamp, and a client (Rust or C) that reads it. You need both.
1Install & start the daemon
Install from a release RPM, or build from crates.io with cargo install.
# Download the RPM from the GitHub releases page
# (x86_64 and aarch64 Linux packages are provided)
sudo rpm -i clockbound-*.rpmThen enable and start it as a systemd service:
sudo systemctl enable clockbound
sudo systemctl start clockboundThe RPM installs the clockbound.service systemd unit for you. If you installed with cargo install, install the unit file first (shown in that tab) — otherwise systemctl enable clockbound will report that the unit was not found.
The daemon is zero-config: it auto-detects reference time sources and the platform. For the optional TOML configuration, see the Configuration reference.
2Verify it's synchronized
Check the clock status with cbctl, the command-line utility that ships with the daemon:
cbctl statusFor other subcommands, such as waitsync and sources, see the cbctl reference.
3Add a client to your application
Use the first-party Rust crate or the C/FFI library. Both read the daemon's shared-memory segment and return an earliest/latest pair plus a clock status.
[dependencies]
clock-bound = "3.0.0-rc.0"Full build/link instructions for the C library live in the Clients reference.
Prerequisites
| OS / arch | Linux on x86_64 or aarch64 (incl. AWS Graviton) |
|---|---|
| Privileges | The daemon runs as a privileged user (systemd service) |
| VMClock (disruption support) | AL2 kernel-5.10.223-211.872+, AL2023 kernel-6.1.102-108.177+, or upstream Linux 6.13+ |
| C client | gcc and the libclockbound library + header installed |
| Best accuracy | EC2 instance with the enhanced Amazon Time Sync Service and a configured PTP Hardware Clock |
If /dev/vmclock0 exists but the daemon can't read it, grant read access: sudo chmod a+r /dev/vmclock0. See Platforms for PHC and EC2 setup.