Files
Ciro Santilli 六四事件 法轮功 d7a24ea200 start moving malloc and friends in
2019-08-11 00:00:00 +00:00

17 lines
351 B
C++

// Count to infinity sleeping one second per number.
//
// https://cirosantilli.com/linux-kernel-module-cheat#cpp-multithreading
#include <chrono>
#include <thread>
#include <iostream>
int main() {
int i = 0;
while (1) {
std::cout << i << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(1));
i++;
}
}