condvar fixes
This commit is contained in:
16
main.cpp
16
main.cpp
@@ -87,7 +87,7 @@ void phase(const char * msg) {
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
piCout << "main";
|
||||
/*piCout << "main";
|
||||
|
||||
PITimer timer;
|
||||
timer.setSlot([](){
|
||||
@@ -101,7 +101,19 @@ int main(int argc, char * argv[]) {
|
||||
PITimeMeasurer tm;
|
||||
timer.stop();
|
||||
double tm_ms = tm.elapsed_m();
|
||||
piCout << "stop took" << tm_ms;
|
||||
piCout << "stop took" << tm_ms;*/
|
||||
|
||||
PIWaitEvent event;
|
||||
event.create();
|
||||
tm.reset();
|
||||
PIThread::runOnce([&event](){
|
||||
//piMSleep(100);
|
||||
piCout << "interrupt";
|
||||
//event.interrupt();
|
||||
});
|
||||
event.sleep(2010000);
|
||||
double tm_ms = tm.elapsed_m();
|
||||
piCout << "waited for" << tm_ms;
|
||||
return 0;
|
||||
|
||||
/*for (int i = 0; i < count; ++i)
|
||||
|
||||
Reference in New Issue
Block a user