GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tleb/clkdump: Dump clock_gettime(2) output each second

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
clkdump.c
clkdump.c
 
 

Repository files navigation

clkdump

  • Goal? Dump clock_gettime(2) output each second.
  • Why? Debug clock status across kernel suspend.
  • What? Print to stdout every second the current datetime, the output of clock_gettime() and the delta with the previous output. This is done for every clock type.

Example usage below.

  • First column is gmtime(time(NULL)) formatted output.
  • Second column is clock name.
  • Third column is clock value (struct timespec has seconds and nanoseconds).
  • Fourth column is delta with previous value of the same clock.
./clkdump | grep -e 'MONOTONIC\s' -e 'TAI'
Sat, 1 Jan 2000 00:35:10 GMT    CLOCK_TAI          946686910 s + 738663970 ns     1.000084 s
Sat, 1 Jan 2000 00:35:10 GMT    CLOCK_MONOTONIC         1908 s + 984282665 ns     1.000084 s
Sat, 1 Jan 2000 00:35:11 GMT    CLOCK_TAI          946686911 s + 738747045 ns     1.000083 s
Sat, 1 Jan 2000 00:35:11 GMT    CLOCK_MONOTONIC         1909 s + 984365775 ns     1.000083 s
Sat, 1 Jan 2000 00:35:12 GMT    CLOCK_TAI          946686912 s + 738827060 ns     1.000080 s
Sat, 1 Jan 2000 00:35:12 GMT    CLOCK_MONOTONIC         1910 s + 984445785 ns     1.000080 s
Sat, 1 Jan 2000 00:35:55 GMT    CLOCK_TAI          946686955 s + 834063590 ns    43.095237 s
Sat, 1 Jan 2000 00:35:55 GMT    CLOCK_MONOTONIC         1954 s +  79683035 ns    43.095237 s
Sat, 1 Jan 2000 00:35:56 GMT    CLOCK_TAI          946686956 s + 834202020 ns     1.000138 s
Sat, 1 Jan 2000 00:35:56 GMT    CLOCK_MONOTONIC         1955 s +  79820815 ns     1.000138 s
Sat, 1 Jan 2000 00:35:57 GMT    CLOCK_TAI          946686957 s + 834299360 ns     1.000097 s
Sat, 1 Jan 2000 00:35:57 GMT    CLOCK_MONOTONIC         1956 s +  79918115 ns     1.000097 s
Sat, 1 Jan 2000 00:35:58 GMT    CLOCK_TAI          946686958 s + 834427260 ns     1.000128 s
Sat, 1 Jan 2000 00:35:58 GMT    CLOCK_MONOTONIC         1957 s +  80046225 ns     1.000128 s

About

Dump clock_gettime(2) output each second

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.