tinygo
tinygo copied to clipboard
Implement time.NewTimer and time.NewTicker
This has been requested before in #1037 and it is necessary for using the stdlib testing package. I have compared the code size before and after and except for very nontrivial cases the code size is the same (even with the scheduler additions). All examples in the drivers repo remain the same.
When asyncify lands might be a good time to revisit this...?
When asyncify lands might be a good time to revisit this...?
@dkegel-fastly that is a very good question. @aykevl what do you think?
@aykevl Any progress on this?
Implementing time.startTimer
may result in some of the following tests being ok
https://tinygo.org/docs/reference/lang-support/stdlib/
- bufio
- compress/gzip
- encoding/base64
- go/printer
- image/jpeg
- io
- mime/quotedprintable
It would also be nice to be able to use time.After, time.Tick, etc.
@sago35 my port of @aykevl code seems to be working well to me. It's pretty much Ayke's code, so not sure if he wants to take it forward. If not, I think my PR is ready to review: https://github.com/tinygo-org/tinygo/pull/2954
Closing in favor of #2954