Skip to content

Commit

Permalink
unix: add ClockSettime on Linux
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
yarikk authored and gopherbot committed Oct 10, 2024
1 parent 7143f4a commit fe162ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions unix/syscall_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys ClockAdjtime(clockid int32, buf *Timex) (state int, err error)
//sys ClockGetres(clockid int32, res *Timespec) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys ClockSettime(clockid int32, time *Timespec) (err error)
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
//sys Close(fd int) (err error)
//sys CloseRange(first uint, last uint, flags uint) (err error)
Expand Down
10 changes: 10 additions & 0 deletions unix/zsyscall_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fe162ba

Please sign in to comment.