Lines Matching +full:tracking +full:- +full:time

7 reporting and tracking of timed events from hardware timing sources of
10 Time Units
13 Kernel time is tracked in several units which are used for different
16 Real time values, typically specified in milliseconds or microseconds,
17 are the default presentation of time to application code. They have
29 over time, and is available from
46 ----------
49 rounding control for all time units. Any unit of "ms" (milliseconds),
66 word, these conversions expand to a 2-4 operation sequence, requiring
79 The internal tracking, however, is as a 64 bit integer count of ticks.
81 own conversions to portable real time units) may access this with
88 Conceptually, this indicates the time at which an event will occur.
104 a time in milliseconds after the current time.
106 What is meant by "current time" for relative timeouts depends on the context:
110 passed to :c:func:`k_work_init_delayable`), "current time" is the exact time at
112 time" will already have advanced. This is to ensure that timers scheduled from
115 introducing systematic clock drift over time.
117 * When scheduling a timeout from application context, "current time" means the
118 value returned by :c:func:`k_uptime_ticks` at the time at which the kernel
127 being 32 bits. Large uptime counts in non-tick units will experience
129 timing-sensitive applications with long uptimes will be configured to
142 -------------
146 a double-linked list, with an attendant delta count in ticks from the
149 event, along with a :c:struct:`_timeout` tracking struct that is
150 expected to be embedded within subsystem-defined data structures (for
155 multiple-conversion steps internal to the kernel, so precision is
166 -------------
174 system boot). These calls can occur at any time, but the driver is
178 be correct over time and subject to minimal skew vs. other counters
179 and real world time.
187 current time, but that does not absolve the driver of the
188 requirement to provide ticks at a steady rate over time. Naive
206 each time.
217 -----------
231 per-CPU tracking, and expects that if two timer interrupts fire near
238 per-CPU counter. The complexity here (for example: ensuring counter
246 non-zero ticks argument to :c:func:`sys_clock_announce`. This is probably
253 Time Slicing
254 ------------
257 to the scheduler that allow implementation of time slicing of threads.
258 A thread time-slice cannot be a timeout value, as it does not reflect
259 a global expiration but instead a per-CPU value that needs to be
265 smaller value than the current next timeout when a time sliced thread
269 -------------------------------------
285 will need to use a different, integer-valued token to represent
291 --------------------------------
293 Ideally, code that takes a "timeout" parameter specifying a time to
307 .. code-block:: c
319 k_sem_take(obj->sem, timeout_in_ms);
321 /* Subtract elapsed time */
322 timeout_in_ms -= (k_uptime_get_32() - start);
333 .. code-block:: c
337 /* Compute the end time from the timeout */
345 /* Update timeout with remaining time */
349 k_sem_take(obj->sem, timeout);
361 delta timeouts need to be interpreted relative to a "current time",
362 and obviously that time is the time of the call to
363 :c:func:`sys_timepoint_calc`. But the user expects that the time is
364 the time they passed the timeout to you. Care must be taken to call