Mutex experiments
This commit is contained in:
13
experiments/can_send_multithread.cpp
Normal file
13
experiments/can_send_multithread.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "can_send.h"
|
||||
#include <future>
|
||||
#include <picout.h>
|
||||
|
||||
int main() {
|
||||
auto time1 = std::async(std::launch::async, [] { return test_send(PCAN_USBBUS1); });
|
||||
auto time2 = std::async(std::launch::async, [] { return test_send(PCAN_USBBUS2); });
|
||||
|
||||
piCout << "measurements for PCAN_USBBUS1:" << time1.get() / 1000.f << "ms";
|
||||
piCout << "measurements for PCAN_USBBUS2:" << time2.get() / 1000.f << "ms";
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user