41#include <visp3/core/vpConfig.h>
42#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
51# pragma clang diagnostic push
52# pragma clang diagnostic ignored "-Wnonportable-system-include-path"
58# pragma clang diagnostic pop
68#include <visp3/core/vpTime.h>
72#ifdef ENABLE_VISP_NAMESPACE
80 for (
int i = 0;
i < 100000;
i++)
81 for (
int j = 0;
j < 100;
j++)
83 std::cout <<
"Computed dummy value: " <<
v << std::endl;
91#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
100#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
128 std::cout <<
"t1-t0: computation time: " <<
t1 - t0 << std::endl;
130 std::cout <<
"t2-t1: wait(t1, 40 ms): " << t2 -
t1 << std::endl;
131 std::cout <<
"t3-t2: sleep(10 ms): " << t3 - t2 << std::endl;
132 std::cout <<
"t4-t3: sleep(2 ms): " << t4 - t3 << std::endl;
133 std::cout <<
"t5-t4: wait(t, 19 ms): " << t5 - t4 << std::endl;
134 std::cout <<
"t6-t5: wait(5 ms): " << t6 - t5 << std::endl;
135 std::cout <<
"t7-t6: wait(21 ms): " << t7 - t6 << std::endl;
136 std::cout <<
"t8-t7: wait(2 ms): " << t8 - t7 << std::endl;
137 std::cout <<
"t8-t6: ; chrono: " << chrono.
getDurationMs() << std::endl;
142 std::cout <<
"Catch an exception: " <<
e << std::endl;
146 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 double measureTimeMs()
VISP_EXPORT int wait(double t0, double t)