Skip to content

Commit 5b15f12

Browse files
committed
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
1 parent 7143f4a commit 5b15f12

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)