• Alessandro Rubini's avatar
    tools: added chktime · c7cc61d8
    Alessandro Rubini authored
    This program monitors clock_monotonic and clock_realtime every 10ms
    (or a different time lapse passed on the command line).
    Whenever the difference between them is more than 0.5ms apart from the
    previously-reported difference, it prints the current difference.  All
    such differences are relative to the initial offset of the two clocks,
    when the program started. The difference is prefixed with the current
    date and time, to help logging.
    This is something I already had in my toolbox, so I could see the leap
    second that occurred on Jun 30th 2012.
       tornado.root# ./tools/chktime &
       [1] 23761
       ./tools/chktime: looping every 10 millisecs
       tornado.root# ./tools/jmptime .003
       Requesting time-jump: 0.003000 seconds
          13-02-11-12:22:44:       2997 us
       tornado.root# ./tools/jmptime .003
       Requesting time-jump: 0.003000 seconds
          13-02-11-12:22:52:       5994 us
       tornado.root# ./tools/jmptime -.006
       Requesting time-jump: -0.006000 seconds
          13-02-11-12:22:58:        -10 us
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
.gitignore 32 Bytes