-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from wwwzbwcom/master
feat: add wasm runtime support and go mod
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2009 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// http://golang.org/src/os/stat_js.go | ||
|
||
package atime | ||
|
||
import ( | ||
"os" | ||
"syscall" | ||
"time" | ||
) | ||
|
||
func timespecToTime(sec, nsec int64) time.Time { | ||
return time.Unix(sec, nsec) | ||
} | ||
|
||
func atime(fi os.FileInfo) time.Time { | ||
stat := fi.Sys().(*syscall.Stat_t) | ||
return timespecToTime(stat.Atime, stat.AtimeNsec) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/djherbis/atime | ||
|
||
go 1.16 |