mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 11:13:27 +00:00
fix time on 32-bit arm on linux
This commit is contained in:
@@ -22,7 +22,7 @@ func abort()
|
|||||||
func exit(code int)
|
func exit(code int)
|
||||||
|
|
||||||
//go:export clock_gettime
|
//go:export clock_gettime
|
||||||
func clock_gettime(clk_id uint, ts *timespec)
|
func clock_gettime(clk_id int32, ts *timespec)
|
||||||
|
|
||||||
const heapSize = 1 * 1024 * 1024 // 1MB to start
|
const heapSize = 1 * 1024 * 1024 // 1MB to start
|
||||||
|
|
||||||
@@ -37,8 +37,8 @@ const tickMicros = 1
|
|||||||
|
|
||||||
// TODO: Linux/amd64-specific
|
// TODO: Linux/amd64-specific
|
||||||
type timespec struct {
|
type timespec struct {
|
||||||
tv_sec int64
|
tv_sec timeT
|
||||||
tv_nsec int64
|
tv_nsec timeT
|
||||||
}
|
}
|
||||||
|
|
||||||
const CLOCK_MONOTONIC_RAW = 4
|
const CLOCK_MONOTONIC_RAW = 4
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// +build !baremetal
|
||||||
|
// +build arm
|
||||||
|
|
||||||
|
package runtime
|
||||||
|
|
||||||
|
type timeT int32
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// +build !baremetal
|
||||||
|
// +build arm64 amd64 i386
|
||||||
|
|
||||||
|
package runtime
|
||||||
|
|
||||||
|
type timeT int64
|
||||||
Reference in New Issue
Block a user