?? timertest2.c
字號(hào):
/* TimerTest2.c */
/*********************************************************************
** 函數(shù)名稱 : TimerDemo
** 功 能 : 高精度時(shí)鐘獲得方法,采用時(shí)間戳的方法,計(jì)算程序運(yùn)行時(shí)間
** 入 口 : 無(wú)
** 出 口 : 無(wú)
** 返 回 : 無(wú)。
** 被調(diào)函數(shù) : sysTimestamp
** 調(diào)用函數(shù) :
** 版 本 : V1.0
** 創(chuàng)建日期 : 2006.02.10
** 作 者 :zhyg
** 修改紀(jì)錄 : 創(chuàng)建
*********************************************************************/
#include "vxWorks.h"
#include "intLib.h"
#include "taskLib.h"
#include "iv.h"
#include "logLib.h"
#include "semLib.h"
void TimerDemo(void)
{
int t, t1,t2;
t=0;
t1 = sysTimestamp();
logMsg(" t1=%d \n",t1,0,0,0,0,0);
t2 = sysTimestamp();
if( t2>t1)
t += (t2-t1);
logMsg("t2=%d\n t2-t1=%d",t2,t2-t1,0,0,0,0);
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -