interp: do not register runtime timers during interp

The runtime hasn't been initialized yet so this leads to problems.

This fixes https://github.com/tinygo-org/tinygo/issues/4123.
This commit is contained in:
Ayke van Laethem
2024-02-19 15:12:16 +01:00
committed by Ron Evans
parent 5557e97888
commit f529b6071d
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -2,6 +2,8 @@ package main
import "time"
var timer = time.NewTimer(time.Millisecond)
func main() {
// Test ticker.
ticker := time.NewTicker(time.Millisecond * 500)