Skip to content

Commit 0701568

Browse files
committed
Use std::this_thread::sleep_for instead of usleep in the demo for cross-platform portability.
1 parent d9397db commit 0701568

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demo/demo.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#include <fmt/color.h>
22
#include <fmt/format.h>
33
#include <nanoplan/nanoplan.h>
4-
#include <unistd.h>
54

65
#include <algorithm>
76
#include <chrono>
7+
#include <thread>
88
#include <memory>
99
#include <random>
1010

@@ -200,7 +200,7 @@ int main(int argc, char** argv) {
200200
start = path[1];
201201
}
202202

203-
usleep(1e5);
203+
std::this_thread::sleep_for(std::chrono::milliseconds(100));
204204
} while (summary.termination == Termination::SUCCESS);
205205
showcursor();
206206

0 commit comments

Comments
 (0)