==== Time ==== OSTimeTick ========== .. code-block:: c void OSTimeTick(void); * Called by the hardware timer tick. Use by uCOS to increment its internal timer. * The timer interrupt should occur 10 to 100 times per second. * This function should be called by the timer IRQ through a function pointer set in the VIC. OSTimeDly ========= .. code-block:: c void OSTimeDly(INT16U ticks); * Provides a timed delay. * Ticks is a value between 0 to 65,536 (16 bits) * A delay of 0 means no delay but it does remove the task from the ready list and calls the scheduler, forcing a context switch. * The delay resolution is one tick. What that means is that a delay of N will actually be anywhere from N-1 to N. Possibly one less than asked for. .. image:: Time_Delay_Resolution.png :width: 600 OSTimeDlyHMSM ============= .. code-block:: c INT8U OSTimeDlyHMSM(INT8U hours, INT8U minutes, INT8U seconds, INT16U milli); * Alternative interface for the time delay. * Enables setting the delay in hours, minutes, seconds, and milliseconds. * Depends on a correctly set OS_TICKS_PER_SEC in os_cfg.h. * Can delay up to 256 hours or 11 days. * Forces a context switch. OSTimeDlyResume =============== .. code-block:: c INT8U OSTimeDlyResume(INT8U prio); * Cancels the delay of the task at the specified priority. * Also cancels waiting for an event with a timeout delay. Though it will appear to the task that the timeout had expired. OSTimeSet ========= .. code-block:: c void OSTimeSet(INT32U ticks); * Sets the uCOS time count. * Timer count is a 32 bit value. * Rolls over at 4,294,967,295 ticks or 4GB ticks. OSTimeGet ========= .. code-block:: c INT32U OSTimeGet(void); * Get current time count.