Skip to content

Ticker.Reset is broken on RP2350 #4688

Open
@tdunning

Description

@tdunning

I wrote a small program that was using a Ticker as a timeout and found that resetting the Ticker exposed a missing bit in the runtime.

Here is a tiny program that illustrates this:

package main

import (
	"time"
)

func main() {
	t := time.NewTicker(10 * time.Millisecond)
	t.Reset(time.Duration(100) * time.Millisecond)
}

Attempting to compile and flash this results in this output:

$  tinygo flash -target=pico2 -scheduler=tasks -gc=conservative -size=full -stack-size=20kb -monitor TickerBug/main.go
/usr/local/go/src/time/tick.go:58: linker could not find symbol time.modTimer
$

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsrp2350

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions