1,代码
#include <stdio.h>
//#include<linux/delay.h> //linux内核级文件头,用户应用层一般调用不了
#include<unistd.h> //linux用户级
//#include<time.h>
//#include<utime.h>
//#include<syswait.h>
//#include<windows.h> //windows用户级 包含sleep()函数
int main()
{
static unsigned int cnt=0;
while(1)
{
cnt++;
printf(“welcome to here !!!,cnt=%d \n”,cnt);
usleep(1000000);
}
return 0;
}
2.编译gcc -o test test.c 其中test是test.c生成的可执行函数
3,接下来./test就开始运行