46 #include <visp3/core/vpConfig.h> 47 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))) // UNIX 60 #include <visp3/core/vpTime.h> 69 for (
int i = 0; i < 100000; i++)
70 for (
int j = 0; j < 100; j++)
72 std::cout <<
"Computed dummy value: " << v << std::endl;
80 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))) // UNIX 89 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))) // UNIX 112 std::cout <<
"t1-t0: computation time: " << t1 - t0 << std::endl;
114 std::cout <<
"t2-t1: wait(t1, 40 ms): " << t2 - t1 << std::endl;
115 std::cout <<
"t3-t2: sleep(10 ms): " << t3 - t2 << std::endl;
116 std::cout <<
"t4-t3: sleep(2 ms): " << t4 - t3 << std::endl;
117 std::cout <<
"t5-t4: wait(t, 19 ms): " << t5 - t4 << std::endl;
118 std::cout <<
"t6-t5: wait(5 ms): " << t6 - t5 << std::endl;
119 std::cout <<
"t7-t6: wait(21 ms): " << t7 - t6 << std::endl;
120 std::cout <<
"t8-t7: wait(2 ms): " << t8 - t7 << std::endl;
124 std::cout <<
"Catch an exception: " << e << std::endl;
128 std::cout <<
"vpTime is not implemented on Universal Windows Platform" << std::endl;
VISP_EXPORT int wait(double t0, double t)
error that can be emited by ViSP classes.
VISP_EXPORT double measureTimeMs()