Skip to content

Commit fe162ba

Browse files
yarikkgopherbot
authored andcommitted
unix: add ClockSettime on Linux
The syscall clock_settime(3) is used to set the time on the specified clock. It is a counterpart to clock_gettime(3) which is already exposed as ClockGettime here. Fixes golang/go#69830 Change-Id: I6145c915754f31e3c50f6a11568eb9d5ba12a778 GitHub-Last-Rev: 5b15f12 GitHub-Pull-Request: #221 Reviewed-on: https://go-review.googlesource.com/c/sys/+/619255 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent 7143f4a commit fe162ba

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

unix/syscall_linux.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,6 +1860,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
18601860
//sys ClockAdjtime(clockid int32, buf *Timex) (state int, err error)
18611861
//sys ClockGetres(clockid int32, res *Timespec) (err error)
18621862
//sys ClockGettime(clockid int32, time *Timespec) (err error)
1863+
//sys ClockSettime(clockid int32, time *Timespec) (err error)
18631864
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
18641865
//sys Close(fd int) (err error)
18651866
//sys CloseRange(first uint, last uint, flags uint) (err error)

unix/zsyscall_linux.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)