| 123456789101112131415161718192021222324252627 |
- #include "core/sophiar_manager.h"
- #include "third_party/static_block.hpp"
- #include <boost/predef.h>
- #ifdef BOOST_OS_WINDOWS_AVAILABLE
- #include <timeapi.h>
- #include <cstdlib>
- #endif // BOOST_OS_WINDOWS_AVAILABLE
- namespace sophiar {
- boost::asio::io_context global_context;
- sophiar_manager global_sophiar_manager;
- #ifdef BOOST_OS_WINDOWS_AVAILABLE
- static_block { // make windows timer more precise
- timeBeginPeriod(1);
- std::atexit([]() { timeEndPeriod(1); });
- };
- #endif // BOOST_OS_WINDOWS_AVAILABLE
- }
|