Log startup time
This commit is contained in:
parent
fb2acde48f
commit
7a3dbf685a
1 changed files with 6 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <psemek/log/log.hpp>
|
||||
#include <psemek/util/pretty_print.hpp>
|
||||
#include <psemek/util/clock.hpp>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
@ -10,11 +12,15 @@ namespace psemek::app
|
|||
template <typename App, typename ... Args>
|
||||
int main(Args && ... args) try
|
||||
{
|
||||
util::clock<std::chrono::milliseconds, std::chrono::high_resolution_clock> clock;
|
||||
|
||||
log::add_sink(log::default_sink(io::std_out(), log::level::debug));
|
||||
log::register_thread("main");
|
||||
|
||||
App app(std::forward<Args>(args)...);
|
||||
|
||||
log::info() << "Started in " << util::pretty(clock.duration(), std::chrono::milliseconds{1});
|
||||
|
||||
log::info() << "Running";
|
||||
app.run();
|
||||
log::info() << "Quitting";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue