diff --git a/examples/PoolBox/application/src/main.cpp b/examples/PoolBox/application/src/main.cpp index 64bee7d0..0ce2fba7 100644 --- a/examples/PoolBox/application/src/main.cpp +++ b/examples/PoolBox/application/src/main.cpp @@ -1,5 +1,21 @@ +#include #include +extern "C" void busy_loop(int count); + +static void mesaure_busy_loop() { + static constexpr auto Counts = 500; + + JabyEngine::HighResTime::enable(); + const auto start = JabyEngine::HighResTime::get_time_stamp(); + busy_loop(Counts); + const auto end = JabyEngine::HighResTime::get_time_stamp(); + JabyEngine::HighResTime::disable(); + + printf("Busy loop of %i took %ims %ins\n", Counts, start.milliseconds_to(end), start.microseconds_to(end)); +} + void main() { printf("Hello Planschbecken!\n"); + mesaure_busy_loop(); } \ No newline at end of file