-
Notifications
You must be signed in to change notification settings - Fork 578
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
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: 57a5a04) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/621498. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Yaroslav Kolomiiets: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Ian Lance Taylor: Patch Set 1: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-10-22T22:45:28Z","revision":"d5b6ecbfb75bb555c21c2565098eaf833d8b06ab"} Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Ian Lance Taylor: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Go LUCI: Patch Set 1: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Ian Lance Taylor: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
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())}".
This PR (HEAD: 975cf14) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/621498. Important tips:
|
Message from Yaroslav Kolomiiets: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Yaroslav Kolomiiets: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
Message from Ian Lance Taylor: Patch Set 3: Hold+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/621498. |
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())}".
Fixes golang/go#70032