Skip to main content
PUT
Set clock sync
Enable or disable the sandbox daemon’s built-in CLOCK_REALTIME syncer. Workloads inside the sandbox can call the same control surface over /run/tensorlake/guest.sock (PUT /v1/clock-sync); see How clocks work in sandboxes.

Example request

Set SANDBOX_URL to the sandbox_url returned by Get Sandbox and authenticate with your Tensorlake API key:
This disables both periodic (10s) and post-resume CLOCK_REALTIME steps and waits for any in-flight clock_settime call to finish before returning 200 OK. Send {"enabled": true} to re-enable syncing and wake the corrector immediately to re-anchor guest CLOCK_REALTIME to host UTC.

Behavior and errors

State lives in daemon memory, so it persists across resident suspend and resume, full-memory snapshots, and live migration, and resets to enabled: true on a fresh boot or filesystem-only snapshot restore.
  • 400 Bad Request: malformed JSON body
  • 413 Payload Too Large: request body exceeds 4 KB
  • 422 Unprocessable Entity: unknown field in JSON body
  • 501 Not Implemented: runtime doesn’t allow toggling wall-clock sync (code: "CLOCK_SYNC_UNSUPPORTED"), such as GPU sandboxes running under gVisor or VMs lacking /dev/ptp0 (KVM virtual PTP) or CAP_SYS_TIME

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
enabled
boolean
required

Set to false to disable periodic and post-resume host wall-clock steps, or true to re-enable and re-anchor immediately.

Response

Updated wall-clock sync status

enabled
boolean
required

Whether host UTC wall-clock syncing is currently active. Always true on runtimes where the host clock is authoritative (such as gVisor).

configurable
boolean
required

Whether this runtime allows toggling wall-clock sync via PUT /api/v1/clock-sync or /run/tensorlake/guest.sock.

reason
string

Human-readable explanation present when configurable is false.