41 #include <visp3/core/vpConfig.h>
42 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
55 #include <visp3/core/vpTime.h>
59 #ifdef ENABLE_VISP_NAMESPACE
67 for (
int i = 0; i < 100000; i++)
68 for (
int j = 0; j < 100; j++)
70 std::cout <<
"Computed dummy value: " << v << std::endl;
78 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
87 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
115 std::cout <<
"t1-t0: computation time: " << t1 - t0 << std::endl;
117 std::cout <<
"t2-t1: wait(t1, 40 ms): " << t2 - t1 << std::endl;
118 std::cout <<
"t3-t2: sleep(10 ms): " << t3 - t2 << std::endl;
119 std::cout <<
"t4-t3: sleep(2 ms): " << t4 - t3 << std::endl;
120 std::cout <<
"t5-t4: wait(t, 19 ms): " << t5 - t4 << std::endl;
121 std::cout <<
"t6-t5: wait(5 ms): " << t6 - t5 << std::endl;
122 std::cout <<
"t7-t6: wait(21 ms): " << t7 - t6 << std::endl;
123 std::cout <<
"t8-t7: wait(2 ms): " << t8 - t7 << std::endl;
124 std::cout <<
"t8-t6: ; chrono: " << chrono.
getDurationMs() << std::endl;
129 std::cout <<
"Catch an exception: " << e << std::endl;
133 std::cout <<
"vpTime is not implemented on Universal Windows Platform" << std::endl;
void start(bool reset=true)
error that can be emitted by ViSP classes.
VISP_EXPORT int wait(double t0, double t)
VISP_EXPORT double measureTimeMs()