mynewt-core time abstraction  
More...
#include "os/os_error.h"
#include "ztimer.h"
 
Go to the source code of this file.
◆ OS_TICKS_PER_SEC
Ticks per seconds, ztimer_msec is used as system timer. 
Definition at line 32 of file os_time.h.
 
 
◆ os_time_delay()
Wait until the number of ticks has elapsed, BLOICKING. 
- Parameters
 - 
  
    | [in] | ticks | The number of ticks to wait.  | 
  
   
Definition at line 101 of file os_time.h.
 
 
◆ os_time_get()
Returns the low 32 bits of cputime. 
- Returns
 - uint32_t The lower 32 bits of cputime 
 
Definition at line 39 of file os_time.h.
 
 
◆ os_time_ms_to_ticks()
  
  
      
        
          | static os_error_t os_time_ms_to_ticks  | 
          ( | 
          uint32_t |           ms,  | 
         
        
           | 
           | 
          os_time_t * |           out_ticks ) | 
         
       
   | 
  
inlinestatic   | 
  
 
Converts the given number of milliseconds into cputime ticks. 
- Parameters
 - 
  
    | [in] | ms | The number of milliseconds to convert to ticks  | 
    | [out] | out_ticks | The number of ticks corresponding to 'ms' | 
  
   
- Returns
 - os_error_t OS_OK - no error 
 
Definition at line 52 of file os_time.h.
 
 
◆ os_time_ms_to_ticks32()
  
  
      
        
          | static os_time_t os_time_ms_to_ticks32  | 
          ( | 
          uint32_t |           ms | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Converts the given number of milliseconds into cputime ticks. 
- Parameters
 - 
  
    | [in] | ms | The number of milliseconds to convert to ticks | 
  
   
- Returns
 - uint32_t The number of ticks corresponding to 'ms' 
 
Definition at line 79 of file os_time.h.
 
 
◆ os_time_ticks_to_ms()
  
  
      
        
          | static os_error_t os_time_ticks_to_ms  | 
          ( | 
          os_time_t |           ticks,  | 
         
        
           | 
           | 
          uint32_t * |           out_ms ) | 
         
       
   | 
  
inlinestatic   | 
  
 
Convert the given number of ticks into milliseconds. 
- Parameters
 - 
  
    | [in] | ticks | The number of ticks to convert to milliseconds.  | 
    | [out] | out_ms | The converted milliseconds from 'ticks' | 
  
   
- Returns
 - os_error_t OS_OK - no error 
 
Definition at line 66 of file os_time.h.
 
 
◆ os_time_ticks_to_ms32()
Convert the given number of ticks into milliseconds. 
- Parameters
 - 
  
    | [in] | ticks | The number of ticks to convert to milliseconds. | 
  
   
- Returns
 - uint32_t The number of milliseconds corresponding to 'ticks' 
 
Definition at line 91 of file os_time.h.