Wait/Pause an amount of seconds in C

前端 未结 3 805
温柔的废话
温柔的废话 2021-01-11 12:33

I wrote a little console application, and I want it to pause for a certain number of seconds before the cycle (a while) starts again.

I\'m working on Windows operati

3条回答
  •  北海茫月
    2021-01-11 13:01

    easy:

    while( true )
    {
        // your stuff
        sleep( 10 ); // sleeping for 10 seconds
    };
    

提交回复
热议问题