-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
WIPWork-In-ProgressWork-In-ProgressdiscussionSomething that needs more discussionSomething that needs more discussionenhancementNew feature or requestNew feature or request
Description
I think it's important to make a distinction between a clock and a timer. These are my current working definitions:
- Clock: Any entity that periodically counts (ie a hardware timer/counter peripheral). Generally, this needs to be monotonic. A wrapping clock is considered monotonic in this context as long as it fulfills the other requirements.
- Timer: An entity that counts toward an expiration.
In terms of a Clock
interrupt/wake feature I was working on, a timer is based on a clock and holds the instant at which the timer expires. Upon expiration a number of different things could happen including an interrupt/wake, a semaphore, etc.
Features I would expect for a clock:
- get an instant
Features I would expect from a timer:
- set the duration
- start
- restart (not resume)
- poll the status (not-running, running-enabled, running-disabled, expired)
- set the action to be taken upon expiration
- enable/disable action (enable/disable interrupt)
- block until expired (wait/delay)
Metadata
Metadata
Assignees
Labels
WIPWork-In-ProgressWork-In-ProgressdiscussionSomething that needs more discussionSomething that needs more discussionenhancementNew feature or requestNew feature or request