mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
fix: allow nintendoswitch target to compile
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -84,6 +84,19 @@ func ticks() timeUnit {
|
||||
return timeUnit(ticksToNanoseconds(timeUnit(getArmSystemTick())))
|
||||
}
|
||||
|
||||
// timeOffset is how long the monotonic clock started after the Unix epoch. It
|
||||
// should be a positive integer under normal operation or zero when it has not
|
||||
// been set.
|
||||
var timeOffset int64
|
||||
|
||||
//go:linkname now time.now
|
||||
func now() (sec int64, nsec int32, mono int64) {
|
||||
mono = nanotime()
|
||||
sec = (mono + timeOffset) / (1000 * 1000 * 1000)
|
||||
nsec = int32((mono + timeOffset) - sec*(1000*1000*1000))
|
||||
return
|
||||
}
|
||||
|
||||
var stdoutBuffer = make([]byte, 120)
|
||||
var position = 0
|
||||
|
||||
@@ -98,6 +111,14 @@ func putchar(c byte) {
|
||||
position++
|
||||
}
|
||||
|
||||
func buffered() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func getchar() byte {
|
||||
return 0
|
||||
}
|
||||
|
||||
func abort() {
|
||||
for {
|
||||
exit(1)
|
||||
|
||||
Reference in New Issue
Block a user