void delay(unsigned someinteger)
{
clock_t start_time = clock();
while (clock() < start_time + someinteger);
}
int main(void)
{
printf("start
");
printf("Hello"); delay(20000);
printf("
");
}
See the delay between start
and Hello
. (some patience at the beginning required as I had to click run button)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…