library: c/syscall

This commit is contained in:
xushiwei
2024-07-11 19:11:54 +08:00
parent b81638794f
commit a5ff25b0fe
38 changed files with 46 additions and 13 deletions

View File

@@ -22,8 +22,12 @@ import (
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/os"
"github.com/goplus/llgo/c/syscall"
)
type Timespec syscall.Timespec
type Timeval syscall.Timeval
// Unix returns the time stored in ts as seconds plus nanoseconds.
func (ts *Timespec) Unix() (sec int64, nsec int64) {
return int64(ts.Sec), int64(ts.Nsec)