Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <thread>
- void CStypleFunction() {
- printf("CStypleFunction() s\n");
- std::chrono::milliseconds dura(2000);
- std::this_thread::sleep_for(dura); // 2000 ミリ秒
- printf("CStypleFunction() e\n");
- }
- void CppStypeClass::MainThread(int param) {
- printf("MainThread() start\n");
- bool bLoop = true; // thread control flag
- while (bLoop) {
- param--;
- if (param == 0) {
- bLoop = false;
- }
- }
- printf("MainThread() end\n");
- }
Add Comment
Please, Sign In to add comment