Skip to content

Document boottime calls, add Go wrappers - #372

Closed
nicholasberlin wants to merge 1 commit into
mainfrom
time-since-boot-docs
Closed

Document boottime calls, add Go wrappers#372
nicholasberlin wants to merge 1 commit into
mainfrom
time-since-boot-docs

Conversation

@nicholasberlin

@nicholasberlin nicholasberlin commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #368 (now merged, rebased onto main), closing the gaps noted there:

  • Manpages for quark_update_boottime(3), quark_get_boottime(3) and
    quark_time_to_wallclock(3), listed in quark(7), with the HTML docs
    regenerated. The pages document which times are expressed since boot,
    that btime comes from /proc/stat and moves on clock steps, and two
    common ways of detecting a step (polling the CLOCK_REALTIME -
    CLOCK_BOOTTIME delta, or a timerfd armed with
    TFD_TIMER_CANCEL_ON_SET). Each page carries a HISTORY section noting
    the calls appeared in quark 0.8, when all times handed out by quark
    switched from epoch to since-boot, so readers on older versions
    aren't misled.
  • The in-tree Go bindings (go/quark) learn UpdateBoottime(), Boottime()
    and TimeToWallclock(), mirroring the C calls, plus a non-root test
    (passes locally; TestQuark still requires root).

Also:

  • The 0.8 CHANGES entry now lists quark_socket established_time and
    close_time in the BREAKING, SILENTLY bullet, which had missed them,
    and gains a bullet for the new Go calls.
  • README.md regenerated via make README.md (html2markdown).

mandoc -Tlint passes on the new pages, go vet and gofmt are clean.

@nicholasberlin
nicholasberlin requested a review from a team as a code owner August 3, 2026 19:23
@nicholasberlin
nicholasberlin force-pushed the time-since-boot branch 2 times, most recently from 133607b to 690fe53 Compare August 5, 2026 18:32
@nicholasberlin
nicholasberlin changed the base branch from time-since-boot to main August 5, 2026 19:47
@nicholasberlin
nicholasberlin force-pushed the time-since-boot-docs branch 3 times, most recently from 3469abf to ada5b67 Compare August 6, 2026 17:48
quark_update_boottime(3), quark_get_boottime(3) and
quark_time_to_wallclock(3) shipped in the time-since-boot branch
without manpages; every other exported function has one. Add the
three pages, list them in quark(7), and regenerate the HTML docs
and README.

The pages document which times are expressed since boot, that btime
comes from /proc/stat and moves on clock steps, and the two common
ways of detecting a step (polling the CLOCK_REALTIME -
CLOCK_BOOTTIME delta or a TFD_TIMER_CANCEL_ON_SET timerfd).

The Go bindings learn UpdateBoottime(), Boottime() and
TimeToWallclock(), mirroring the C calls, with a non-root test.
CHANGES also gains a note that quark_socket times are expressed
since boot as well, which the 0.8 entry missed.
@nicholasberlin

Copy link
Copy Markdown
Contributor Author

Superseded by single-concern PRs, one per concern:

The code in those PRs is identical to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant