diff options
Diffstat (limited to 'test/time.cpp')
| -rw-r--r-- | test/time.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/time.cpp b/test/time.cpp new file mode 100644 index 00000000..dac8a2e4 --- /dev/null +++ b/test/time.cpp @@ -0,0 +1,28 @@ +#include "app.hpp" +#include "src/timer.hpp" +#include <cstdio> +#include <thread> +#include <mg/TimeStl.h> + +namespace floormat { + +using namespace std::chrono_literals; + +void test_app::test_time() +{ +#if 0 + constexpr auto to_ms = [](Ns dt) { return Time::to_seconds(dt); }; + Timer::maybe_start(); + + Debug{} << ""; + auto t1 = Time::now(); + std::this_thread::sleep_for(8ms); + auto t2 = Time::now(); + Debug{} << "- foo1" << to_ms(t2 - t1); + Debug{} << "- foo2" << to_ms(Time::now() - t1); + Debug{} << "- foo3" << to_ms(Timer::since_epoch()); + std::fputc('\t', stdout); +#endif +} + +} // namespace floormat |
