// sleep() 秒级

// usleep() 微秒级

#include <iostream>
using namespace std;
#include <unistd.h>
int main() {
    while (1) {
        cout << "hello" << endl;
        // sleep(1);
        usleep(100000);
    }
}



相关文章:

  • 2022-02-19
  • 2022-01-02
  • 2022-12-23
  • 2022-03-03
  • 2021-10-12
  • 2022-12-23
  • 2021-08-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2022-01-27
相关资源
相似解决方案