📄 timing.c
字号:
/***************************************************************/
/* this program is writed by wangtao *********************************/
#include "vxworks.h"
#include "timexLib.h"
#include "stdio.h"
#define ITERATIONS 200
int printit(void);
void timing() /* Function to perform the timging */
{
FUNCPTR function_ptr = printit; /* a pointer to the function "printit" */
timex(function_ptr,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*timing the "print" function */
}
int printit(void)/*Function being timed */
{
int i;
for(i=0;i<ITERATIONS;i++) /* Printing the task id number and the increment variable "i" */
printf("Hello,I am task %d and is i=%d\n",taskIdSelf(),i );
return (0);
}
/**************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -