codeblocks笔记

1 定时操作:

 1 #include <time.h>
 2 void delay(int seconds)
 3 
 4 {
 5 
 6    clock_t start = clock();
 7 
 8    clock_t lay = (clock_t)seconds * CLOCKS_PER_SEC;
 9 
10    while ((clock()-start) < lay)
11 
12      ;
13 
14 }
View Code

 

posted on 2020-12-24 09:12  杰瑞鼠  阅读(103)  评论(0编辑  收藏  举报