Files
multithread_experiments/experiments/can_send.cpp
2020-07-10 16:00:00 +03:00

16 lines
451 B
C++

#include "can_send.h"
#include <future>
#include <picout.h>
int main() {
auto time1 = std::async(std::launch::deferred, [] { return test_send(PCAN_USBBUS1); });
auto time2 = std::async(std::launch::deferred, [] { return test_send(PCAN_USBBUS2); });
time1.wait();
piCout << "measurements for PCAN_USBBUS1:" << time1.get() / 1000.f << "ms";
time2.wait();
piCout << "measurements for PCAN_USBBUS2:" << time2.get() / 1000.f << "ms";
return 0;
}