Clock and time manipulation interface used by the entire OS.  
More...
 | 
| 
#define  | QTIME_NULL | 
|   | To specify a NULL time value. 
  | 
|   | 
| 
#define  | qTimeImmediate | 
|   | To specify a non-wait time value. 
  | 
|   | 
| 
#define  | QTUNIT_MINUTE | 
|   | Conversion factor from seconds to minutes. 
  | 
|   | 
| 
#define  | QTUNIT_HOUR | 
|   | Conversion factor from seconds to hours. 
  | 
|   | 
| 
#define  | QTUNIT_DAY | 
|   | Conversion factor from seconds to days. 
  | 
|   | 
| 
#define  | QTUNIT_WEEK | 
|   | Conversion factor from seconds to weeks. 
  | 
|   | 
| #define  | QTUNIT_TOTIME(_xTime_,  _qUnit_) | 
|   | A macro to perform time conversions.  
  | 
|   | 
| 
#define  | qTimingBase_t | 
|   | A macro to specify a qTime_t type for time-base APIs. 
  | 
|   | 
 | 
| 
typedef qFloat32_t  | qTime_t | 
|   | The typedef that specified an time quantity, usually expressed in seconds. 
  | 
|   | 
| 
typedef qUINT32_t  | qClock_t | 
|   | A 32-bit unsigned integer to hold ticks count. Epochs counter. 
  | 
|   | 
| typedef qClock_t(*  | qGetTickFcn_t) (void) | 
|   | Pointer to Function type qGetTickFcn_t : A function to get the hardware tick value.  
  | 
|   | 
Clock and time manipulation interface used by the entire OS. 
◆ QTUNIT_TOTIME
      
        
          | #define QTUNIT_TOTIME | 
          ( | 
           |           _xTime_,  | 
        
        
           | 
           | 
           |           _qUnit_ ) | 
        
      
 
A macro to perform time conversions. 
- Parameters
 - 
  
    | [in] | _xTime_ | The input time in seconds.  | 
    | [in] | _qUnit_ | The target unit. Use on of the provided factors prefixed with QTUNIT_XXX.  | 
  
   
- Returns
 - The time converted to the specified unit. 
 
 
 
◆ qGetTickFcn_t
      
        
          | typedef qClock_t(* qGetTickFcn_t) (void) | 
        
      
 
Pointer to Function type qGetTickFcn_t : A function to get the hardware tick value. 
- Note
 - User should use bare-metal code to implement this function. Example : 
      return HAL_GetTick();
}
uint32_t qUINT32_t
Unsigned integer type with width of exactly 32 bits respectively.
Definition qtypes.h:48
 
   
- Returns
 - The number of ticks provided by the system HAL. 
 
 
 
◆ qClock_Convert2Clock()
Convert the specified input time(seconds) to time(epochs) 
- Parameters
 - 
  
  
 
- Returns
 - time (t) in epochs 
 
 
 
◆ qClock_Convert2Time()
Convert the specified input time(epochs) to time(seconds) 
- Parameters
 - 
  
  
 
- Returns
 - time (t) in seconds 
 
 
 
◆ qClock_SetTickProvider()
Set the clock-tick provider function. 
- Parameters
 - 
  
    | [in] | provider | A pointer to the tick provider function  | 
  
   
- Returns
 - qTrue on success, otherwise returns qFalse. 
 
 
 
◆ qClock_SetTimeBase()
Set the system time-base for time conversions. 
- Parameters
 - 
  
  
 
- Returns
 - qTrue on success, otherwise returns qFalse. 
 
 
 
◆ qClock_SysTick()
      
        
          | void qClock_SysTick  | 
          ( | 
          void |            | ) | 
           | 
        
      
 
Feed the system tick. 
- Note
 - This call is mandatory and must be called once inside the dedicated timer interrupt service routine (ISR). Example 
void interrupt xPeriodicTimer_ISR( void ) {
}
void qClock_SysTick(void)
Feed the system tick.
Definition qclock.c:94
 
   
 
 
◆ qClock_TimeDeadlineCheck()
Perform a timestamp check. This function computes the amount of time elapsed between the current instant and the init timestamp ti and checks if the result is greater than td. 
- Parameters
 - 
  
    | [in] | ti | Init timestamp in epochs  | 
    | [in] | td | Elapsed time to check in epochs  | 
  
   
- Returns
 - qTrue if the elapsed time (t-ti) is greater or equal to td. Otherwise returns qFalse 
 
 
 
◆ qClock_GetTick
Return the current tick used by the OS. 
- Returns
 - time (t) in epochs.