codeblocks笔记
1 定时操作:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
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 }
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 }