File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package main
2
2
3
3
import (
4
4
"context"
5
- "fmt"
6
5
"log"
7
6
8
7
"github.com/vedhavyas/go-wasm"
@@ -59,7 +58,7 @@ func main() {
59
58
if err != nil {
60
59
panic (err )
61
60
}
62
- fmt .Println (bytes )
61
+ log .Println (bytes )
63
62
64
63
res , err = b .CallFunc ("getError" , nil )
65
64
if err != nil {
@@ -71,5 +70,5 @@ func main() {
71
70
panic (err )
72
71
}
73
72
74
- fmt .Println (verr )
73
+ log .Println (verr )
75
74
}
Original file line number Diff line number Diff line change @@ -72,8 +72,8 @@ func nanotime(ctx unsafe.Pointer, sp int32) {
72
72
func walltime (ctx unsafe.Pointer , sp int32 ) {
73
73
b := getBridge (ctx )
74
74
t := time .Now ().UnixNano ()
75
- nanos := t % 1000000000
76
- b .setInt64 (sp + 8 , t / 1000000000 )
75
+ nanos := t % int64 ( time . Second )
76
+ b .setInt64 (sp + 8 , t / int64 ( time . Second ) )
77
77
b .setInt32 (sp + 16 , int32 (nanos ))
78
78
79
79
}
You can’t perform that action at this time.
0 commit comments