/*********************************************************************
* Author : lile
* Modified : 2020年4月23日星期三 16:56:13
* Email : [email protected]
* HomePage : lile777.blog.csdn.net
* CopyRight : 该文章版权由lile所有。
* 保留原文出处链接和本声明的前提下,可在非商业目的下任意传播和复制。
* 对于商业目的下对本文的任何行为需经作者同意。
*********************************************************************/
0. 系统时间获取(毫秒/微妙)
Uint32 OSA_getCurTimeInMsec(void)
{
static int isInit = FALSE;
static Uint32 initTime=0;
struct timeval tv;
if(isInit==FALSE)
{
isInit = TRUE;
if (gettimeofday(&tv, NULL) < 0)
return 0;
initTime = (Uint32)(tv.tv_sec * 1000u + tv.tv_usec/1000u);
}
if (gettimeofday(&tv, NULL) < 0)
return 0;
return (Uint32)(tv.tv_sec