Skip to content

Commit

Permalink
osdep/timer: update documentation and test for mp_time_ns
Browse files Browse the repository at this point in the history
No longer true after 8bbcc87.
  • Loading branch information
kasper93 committed Jan 24, 2024
1 parent 209d2df commit 1078959
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion osdep/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// Initialize timer, must be called at least once at start.
void mp_time_init(void);

// Return time in nanoseconds. Never wraps. Never returns 0 or negative values.
// Return time in nanoseconds. Never wraps. Never returns negative values.
int64_t mp_time_ns(void);

// Return time in seconds. Can have down to 1 nanosecond resolution, but will
Expand Down
2 changes: 1 addition & 1 deletion test/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int main(void)
/* timekeeping */
{
int64_t now = mp_time_ns();
assert_true(now > 0);
assert_true(now >= 0);

mp_sleep_ns(MP_TIME_MS_TO_NS(10));

Expand Down

0 comments on commit 1078959

Please sign in to comment.