4.9 获取sys_tick
<h1>默认配置 <code>W800_SDK_V1.00.08/src/os/rtos/include/FreeRTOSConfig.h</code></h1>
<pre><code>#define configTICK_RATE_HZ ( ( portTickType ) 500u )</code></pre>
<h1>获取系统时间接口如下</h1>
<pre><code>/*
*********************************************************************************************************
* GET CURRENT SYSTEM TIME
*
* Description: This function is used by your application to obtain the current value of the 32-bit
* counter which keeps track of the number of clock ticks.
*
* Arguments : none
*
* Returns : The current value of OSTime
*********************************************************************************************************
*/
u32 tls_os_get_time(void)</code></pre>
<h1>返回结果为tick次数,1个tick为 2ms,如需1个tick为 1ms,则需配置 <code>W800_SDK_V1.00.08/src/os/rtos/include/FreeRTOSConfig.h</code></h1>
<pre><code>#define configTICK_RATE_HZ ( ( portTickType ) 1000u )</code></pre>