Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unix: add unix.TimeToPtpClockTime on Linux #230

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 23, 2024

  1. unix: add unix.TimeToPtpClockTime on Linux

    Add time conversion helpers for PtpClockTime similar to those
    existing for Timespec and Timeval.
    
    Allows to use the maths of the standard time package while avoiding
    the boilerplate:
    write "ptpt.Time()" instead of "time.Unix(ptpt.Sec, int64(ptpt.Nsec))",
    and "unix.TimeToPtpClockTime(t)" instead of
    "unix.PtpClockTime{Sec: t.Unix(), Nsec: uint32(t.Nanosecond())}".
    yarikk committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    975cf14 View commit details
    Browse the repository at this point in the history