tinygo/src/runtime
Kenneth Bell 24b45555bd runtime: add support for time.NewTimer and time.NewTicker
This commit adds support for time.NewTimer and time.NewTicker. It also
adds support for the Stop() method on time.Timer, but doesn't (yet) add
support for the Reset() method.

The implementation has been carefully written so that programs that
don't use these timers will normally not see an increase in RAM or
binary size. None of the examples in the drivers repo change as a result
of this commit. This comes at the cost of slightly more complex code and
possibly slower execution of the timers when they are used.
2022-08-23 12:37:25 +02:00
..
cgo runtime/cgo: go fmt 2018-09-14 20:58:00 +02:00
debug
internal/sys
interrupt all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
pprof runtime/pprof: add WriteHeapProfile 2022-08-16 09:16:55 +02:00
volatile all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
algorithm.go src/runtime: switch to stronger hash function 2022-06-17 08:46:41 +02:00
arch_386.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
arch_amd64.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
arch_arm.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
arch_arm64.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
arch_avr.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
arch_cortexm.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
arch_tinygoriscv.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
arch_tinygoriscv32.go
arch_tinygoriscv64.go
arch_tinygowasm.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
arch_xtensa.go avr: add support for recover() 2022-06-19 11:51:12 +02:00
asm_386.S runtime: load sp and pc inside tinygo_longjmp 2022-06-19 11:51:12 +02:00
asm_amd64.S runtime: load sp and pc inside tinygo_longjmp 2022-06-19 11:51:12 +02:00
asm_amd64_windows.S runtime: load sp and pc inside tinygo_longjmp 2022-06-19 11:51:12 +02:00
asm_arm.S runtime: load sp and pc inside tinygo_longjmp 2022-06-19 11:51:12 +02:00
asm_arm64.S runtime: load sp and pc inside tinygo_longjmp 2022-06-19 11:51:12 +02:00
asm_avr.S avr: add support for recover() 2022-06-19 11:51:12 +02:00
asm_riscv.S runtime: load sp and pc inside tinygo_longjmp 2022-06-19 11:51:12 +02:00
atomics_critical.go
baremetal.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
chan.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
complex.go compiler: implement complex division 2019-05-11 15:33:37 +02:00
cond.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
cond_nosched.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
debug.go
defer.go compiler: avoid function pointers in defer calls 2018-12-09 16:44:37 +01:00
dynamic_arm64.go
env_linux.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
error.go
extern.go src/runtime: add runtime.Version() 2022-03-19 15:36:44 +01:00
float.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
func.go
gc_conservative.go runtime: add MemStats.Mallocs and Frees 2022-08-20 11:41:20 +02:00
gc_globals.go gc: drop support for 'precise' globals 2022-06-01 21:21:30 +02:00
gc_leaking.go runtime: add MemStats.Mallocs and Frees 2022-08-20 11:41:20 +02:00
gc_none.go runtime: add MemStats.Mallocs and Frees 2022-08-20 11:41:20 +02:00
gc_stack_portable.go
gc_stack_raw.go
hashmap.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
hosted.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
interface.go reflect: add Value.UnsafePointer method 2022-06-12 01:08:02 +02:00
memhash_fnv.go src/runtime: add leveldb memhash 2022-06-17 08:46:41 +02:00
memhash_leveldb.go runtime: add comments about the hash functions 2022-06-17 08:46:41 +02:00
memhash_tsip.go runtime: add comments about the hash functions 2022-06-17 08:46:41 +02:00
mstats.go runtime: add MemStats.Mallocs and Frees 2022-08-20 11:41:20 +02:00
mstats_conservative.go runtime: add MemStats.Mallocs and Frees 2022-08-20 11:41:20 +02:00
mstats_leaking.go runtime: add MemStats.Mallocs and Frees 2022-08-20 11:41:20 +02:00
nonhosted.go
os_darwin.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
os_js.go
os_linux.go runtime: scan all writable program segments 2022-06-16 07:59:21 +02:00
os_other.go gc: drop support for 'precise' globals 2022-06-01 21:21:30 +02:00
os_windows.go syscall.Getpagesize(): add test, implement for Linux and Windows 2022-06-12 01:15:42 +02:00
panic.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
poll.go
print.go runtime: rename printuint to printuintptr 2022-07-15 15:44:40 +02:00
runtime.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_arm7tdmi.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_atmega.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_atsamd21.go samd21,samd51,nrf52840: move usbcdc to machine/usb/cdc (#2972) 2022-07-10 11:33:52 +02:00
runtime_atsamd21e18.go
runtime_atsamd21g18.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_atsamd51.go samd21,samd51,nrf52840: move usbcdc to machine/usb/cdc (#2972) 2022-07-10 11:33:52 +02:00
runtime_atsamd51g19.go
runtime_atsamd51j19.go
runtime_atsamd51j20.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_atsamd51p19.go
runtime_atsamd51p20.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_atsame5x_can.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_atsame51j19.go
runtime_atsame54p20.go
runtime_attiny.go os, runtime: enable os.Stdin for baremetal target 2022-06-01 07:56:25 +02:00
runtime_avr.go avr: simplify timer-based time 2022-05-25 11:53:30 +02:00
runtime_cortexm.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_cortexm_abort.go
runtime_cortexm_hardfault.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_cortexm_hardfault_debug.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_cortexm_qemu.go os, runtime: enable os.Stdin for baremetal target 2022-06-01 07:56:25 +02:00
runtime_esp32.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_esp32c3.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_esp32xx.go os, runtime: enable os.Stdin for baremetal target 2022-06-01 07:56:25 +02:00
runtime_esp8266.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_fe310.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_fe310_baremetal.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_fe310_qemu.go
runtime_k210.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_k210_baremetal.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_mimxrt1062.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_mimxrt1062_clock.go board/teensy40: Add I2C support (#1471) 2022-06-22 11:28:50 +02:00
runtime_mimxrt1062_mpu.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_mimxrt1062_time.go
runtime_nintendoswitch.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_nintendoswitch.S all: rename assembly files to .S extension 2022-08-04 15:43:42 +02:00
runtime_nrf.go samd21,samd51,nrf52840: refactor usb initialization 2022-07-06 17:55:25 +02:00
runtime_nrf52840.go samd21,samd51,nrf52840: move usbcdc to machine/usb/cdc (#2972) 2022-07-10 11:33:52 +02:00
runtime_nrf_bare.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_nrf_softdevice.go
runtime_nxpmk66f18.go os, runtime: enable os.Stdin for baremetal target 2022-06-01 07:56:25 +02:00
runtime_rp2040.go rp2040: add support for usb (#2973) 2022-07-12 15:41:56 +02:00
runtime_stm32.go
runtime_stm32_timers.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_stm32f4.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_stm32f7x2.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_stm32f103.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_stm32f405.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_stm32f407.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_stm32f469.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_stm32l0.go os, runtime: enable os.Stdin for baremetal target 2022-06-01 07:56:25 +02:00
runtime_stm32l0x1.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_stm32l0x2.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_stm32l4.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_stm32l4x2.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_stm32l4x5.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_stm32l5x2.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_stm32wlx.go serial: use common initialization for serial 2022-07-05 20:53:37 +02:00
runtime_tinygoriscv.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
runtime_tinygoriscv64.go
runtime_tinygoriscv_qemu.go os, runtime: enable os.Stdin for baremetal target 2022-06-01 07:56:25 +02:00
runtime_tinygowasm.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_unix.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_wasm_js.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_wasm_js_scheduler.go
runtime_wasm_wasi.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
runtime_windows.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
scheduler.go runtime: add support for time.NewTimer and time.NewTicker 2022-08-23 12:37:25 +02:00
scheduler_any.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
scheduler_none.go
scheduler_tasks.go all: update build constraints to Go 1.17 2022-02-04 07:49:46 +01:00
slice.go
stack.go
string.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
symtab.go runtime: add stubs for Func.FileLine and Frame.PC 2022-01-18 14:38:13 +01:00
sync.go all: basic support for the os package 2018-09-16 13:01:03 +02:00
time.go runtime: add support for time.NewTimer and time.NewTicker 2022-08-23 12:37:25 +02:00
time_nxpmk66f18.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
timer_go116.go runtime: add support for time.NewTimer and time.NewTicker 2022-08-23 12:37:25 +02:00
timer_go118.go runtime: add support for time.NewTimer and time.NewTicker 2022-08-23 12:37:25 +02:00
wait_other.go