diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2023-05-08 20:24:53 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2023-06-08 11:02:55 +0300 |
commit | 911c6880482d9fb8aa45bf0ee6d10b1a721cc944 (patch) | |
tree | 145b5abdfdb4c751d284ea2e73a2c5fd0d0f25e4 | |
parent | 0e5931c6e002cad20a09f38e076e8ee91819274a (diff) |
api: timer: allow leeway when periodic first_tick is zero
It may be very difficult to add a periodic timer exactly one period
from the current time, e.g. in a timer ring implementation. Allow
implementation to place the timer as close as it can. Specify that
first_tick is "less than" one period after the current time, instead
of "within" one period.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Shijith Thotton <sthotton@marvell.com>
-rw-r--r-- | include/odp/api/spec/timer_types.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/odp/api/spec/timer_types.h b/include/odp/api/spec/timer_types.h index fd23bdeca..933e3fd87 100644 --- a/include/odp/api/spec/timer_types.h +++ b/include/odp/api/spec/timer_types.h @@ -477,9 +477,9 @@ typedef struct odp_timer_periodic_start_t { /** First expiration time * * The first expiration time in absolute timer ticks. When zero, the first expiration time - * is one period after the current time. After the first expiration, timer expiration - * continues with the defined frequency. The tick value must be within one timer period - * from the current time. + * is one period after the current time, or as close to that as the implementation can + * achieve. After the first expiration, timer expiration continues with the defined + * frequency. The tick value must be less than one timer period after the current time. */ uint64_t first_tick; |