Skip to content

Commit

Permalink
sys_clock: extra time defines
Browse files Browse the repository at this point in the history
Add additional time defines to round out the `SEC_PER_*` family.
These are easier to type than `SEC_PER_MIN * MIN_PER_HOUR` and
`SEC_PER_MIN * MIN_PER_HOUR * HOUR_PER_DAY`.

Signed-off-by: Jordan Yates <[email protected]>
  • Loading branch information
JordanYates authored and nashif committed Nov 20, 2024
1 parent d703d90 commit b8360ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/zephyr/sys_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ typedef struct {
/** number of seconds per minute */
#define SEC_PER_MIN 60U

/** number of seconds per hour */
#define SEC_PER_HOUR 3600U

/** number of seconds per day */
#define SEC_PER_DAY 86400U

/** number of minutes per hour */
#define MIN_PER_HOUR 60U

Expand Down

0 comments on commit b8360ad

Please sign in to comment.