Is there an alternative sleep function in C to milliseconds?

前端 未结 6 463
难免孤独
难免孤独 2020-11-28 19:25

I have some source code that was compiled on Windows. I am converting it to run on Red Hat Linux.

The source code has included the he

6条回答
  •  情话喂你
    2020-11-28 20:04

    #include 
    #include 
    int main () {
    
    puts("Program Will Sleep For 2 Seconds");
    
    system("sleep 2");      // works for linux systems
    
    
    return 0;
    }
    

提交回复
热议问题