Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions c/time/legacy_functions_other.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//go:build !windows && !((darwin && arm64 && !ios) || (linux && (amd64 || arm64) && !android))

package time

import (
"github.com/goplus/lib/c"
_ "unsafe"
)

//go:linkname Time C.time
func Time(timer *TimeT) TimeT

//go:linkname Mktime C.mktime
func Mktime(timer *Tm) TimeT

//go:linkname Difftime C.difftime
func Difftime(end, start TimeT) float64

//go:linkname Gmtime C.gmtime
func Gmtime(timer *TimeT) *Tm

//go:linkname Localtime C.localtime
func Localtime(timer *TimeT) *Tm

//go:linkname Clock C.clock
func Clock() ClockT

//go:linkname ClockGettime C.clock_gettime
func ClockGettime(clkId ClockidT, tp *Timespec) c.Int

//go:linkname ClockSettime C.clock_settime
func ClockSettime(clkId ClockidT, tp *Timespec) c.Int

//go:linkname ClockGetres C.clock_getres
func ClockGetres(clkId ClockidT, res *Timespec) c.Int
120 changes: 120 additions & 0 deletions c/time/libc_darwin_arm64.go

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

219 changes: 219 additions & 0 deletions c/time/libc_linux_amd64.go

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

Loading
Loading