⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timing.c

📁 嵌入式VxWorks开发所需典型例程源代码
💻 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 + -