mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 10:37:46 +00:00
syscall: add Timespec.Unix() for wasi.
This allows archive/tar to build (but not yet pass).
This commit is contained in:
committed by
Damian Gryski
parent
4716298044
commit
cf4a6d3253
@@ -210,6 +210,11 @@ type Timespec struct {
|
||||
Nsec int64
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
|
||||
// https://github.com/WebAssembly/wasi-libc/blob/main/libc-bottom-half/headers/public/__struct_stat.h
|
||||
// https://github.com/WebAssembly/wasi-libc/blob/main/libc-bottom-half/headers/public/__typedef_ino_t.h
|
||||
// etc.
|
||||
|
||||
Reference in New Issue
Block a user