淳美吧 > 智慧生活 > 心理
导航

c语言定时函数

来源:淳美吧 1.25W 次
c语言定时函数

#include <stdio.h>

void delay(unsigned long n) {//延时时间与n有关系,业余你的电脑的运行速度有关,至于延时是否有5秒,请自行调整

unsigned long i,j,k,m = n

for(i = 0 i < n ++i)

for(j = 0j < n ++j)

for(k = 0j < n ++i)

while(m--)

}

void fun() {}

int main() {

unsigned n = 50000

while(1) {

fun()

delay(n)//延时

}

return 0

}

#函数 #语言
相关内容
热门图文
最近更新
推荐阅读