XFusion API v1.3.0
载入中...
搜索中...
未找到
time

时间戳及精确延迟。 更多...

time 的协作图:

函数

xf_err_t xf_sys_time_init (xf_us_t(*get_us)(void))
 
xf_err_t xf_delay_ms (xf_ms_t n_ms)
 毫秒级延时
 
xf_err_t xf_delay_us (xf_us_t n_us)
 微秒级延时
 
xf_err_t xf_delay_until (xf_us_t n_us)
 延时到一个绝对的 us 级时间戳
 
xf_s_t xf_sys_time_get_s (void)
 获取系统时间的时间戳,单位秒(s)
 
xf_ms_t xf_sys_time_get_ms (void)
 获取系统时间的时间戳,单位毫秒(ms)
 
xf_us_t xf_sys_time_get_us (void)
 获取系统时间的时间戳,单位微秒(us)
 

详细描述

时间戳及精确延迟。

函数说明

◆ xf_sys_time_init()

xf_err_t xf_sys_time_init ( xf_us_t(*)(void)  get_us)

在文件 xf_sys_time.c30 行定义.

◆ xf_delay_ms()

xf_err_t xf_delay_ms ( xf_ms_t  n_ms)

毫秒级延时

参数
n_ms需要延时的毫秒数
返回
xf_err_t 见 xf_err_t.

在文件 xf_sys_time.c40 行定义.

◆ xf_delay_us()

xf_err_t xf_delay_us ( xf_us_t  n_us)

微秒级延时

参数
n_us需要延时的微秒数
返回
xf_err_t 见 xf_err_t.

在文件 xf_sys_time.c57 行定义.

◆ xf_delay_until()

xf_err_t xf_delay_until ( xf_us_t  n_us)

延时到一个绝对的 us 级时间戳

参数
n_us延时到的 us 级时间戳
返回
xf_err_t 见 xf_err_t.

在文件 xf_sys_time.c74 行定义.

◆ xf_sys_time_get_s()

xf_s_t xf_sys_time_get_s ( void  )

获取系统时间的时间戳,单位秒(s)

返回
uint32_t 时间戳(秒)

在文件 xf_sys_time.c88 行定义.

◆ xf_sys_time_get_ms()

xf_ms_t xf_sys_time_get_ms ( void  )

获取系统时间的时间戳,单位毫秒(ms)

返回
xf_ms_t 时间戳(毫秒)

在文件 xf_sys_time.c96 行定义.

◆ xf_sys_time_get_us()

xf_us_t xf_sys_time_get_us ( void  )

获取系统时间的时间戳,单位微秒(us)

返回
xf_us_t 时间戳(微秒)

在文件 xf_sys_time.c104 行定义.