clockoffset

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Shows the time offset to the given NTP server in various formats. Breaks if the time offset reaches a given limit.

Useful for initContainers when accurate time is required (e.g. at minikube, when the host has not yet synchronized the time after wakeup).

Usage

-format string
      output formats:
        s    seconds
        ms   miliseconds
        us   microseconds
        h    human readable
       (default "ms")
-limit int
      exit(2) if offset diff is greather than <n> ms
-ntpserver string
      ntp server hostname
-quiet
      suppress output to standard output
-sleep int
      sleep for <n> ms if the limit was exceeded

Docker example

docker run --rm jb5r/clockoffset \
  -ntpserver time.google.com \
  -format h \
  -limit 20000

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址