Skip to content

ztimer_now() documentation is misleading  #17298

@benpicco

Description

@benpicco

Description

The ztimer_now() documentation states

Get the current time from a clock.

which leads a user to believe it functions the same as xtimer_now().

However I learned that ztimer may just stop a timer if no alarm is scheduled, so the delta between two calls to ztimer_now() may well be zero if there was no alarm set on the timer in question.

There should also be a warning that now values are not comparable across timers, but this is a comparably minor issue.

Versions

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions