📄 testdemo.c
字号:
/* tdemo.c - demonstration program */
#include "vxWorks.h"
#include "stdio.h"
#include "stdlib.h"
#include "taskLib.h"
unsigned long j=0,d=0,p=0;
int i=0;
double f=0;
void mytest(void)
{
intLock();
taskLock();
p=sysTimestampFreq();
j=sysTimestamp();
for(i=0;i<10000000;i++);
d=sysTimestamp();
taskUnlock();
intUnlock();
f=(double)(((double)d-(double)j)/(double)p);
printf("\ncount=%f\n",f);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -