Skip to content

sched.scheduler docs improvement #103417

@nburns

Description

@nburns

Documentation

The docs for sched.scheduler have an example that uses time.time as the timefunc https://docs.python.org/3/library/sched.html#sched.scheduler

Using time.time instead of time.monotonic (the default value of sched.scheduler) creates the potential for "strange things" to happen when seasonal time shifts make the system clock go backwards, resulting in bugs in user's code.

It seems like it would be better to use time.monononic so as to introduce better practices to people learning the language.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions