Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • F firmware
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 29
    • Merge requests 29
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • card10card10
  • firmware
  • Issues
  • #146
Closed
Open
Issue created Aug 30, 2019 by Ferdinand Bachmann@yrlfContributor

There is no way to get a monotonic timestamp

Currently, there is no way to get a monotonically increasing timestamp resistant to updates of the system RTC. This is especially needed when making a button-based interface for changing the RTC.

A monotonic time library can almost be implemented in user software, but not quite:

  • utime.set_time does not allow to set milliseconds, always resetting them to 0
  • updates to the time via BLE will not be picked up by user software and will cause the "monotonic" time to jump

This would need to be implemented in firmware to be reliable.

Proposed pycardium function names:

  • utime.time_monotonic()
  • utime.time_monotonic_ms() (alternatively: utime.time_ms_monotonic())

I don't know where in the firmware setting the time via BLE happens, so I don't know if having a "monotonic" wrapper in pycardium would suffice, or if it would need to be in epicardium for that to be accounted for.

Assignee
Assign to
Time tracking