c 语言中的 sleep() 函数在 windows 和 lin

2019-10-15  本文已影响0人  xcyzjs

在 windows 中, Sleep()

// test.c
#include <stdio.h>
#include <windows.h>
int main(){
  Sleep(3000);
  printf('hello C');
  return 0;
}


在 linux 中, sleep()

// test.c
#include <stdio.h>
#include <stdlib.h>
int main(){
  sleep(3000);
  printf('hello C');
  return 0;
}

上一篇 下一篇

猜你喜欢

热点阅读