22 std::string SysUtils::getCurrentDateAndTime()
24 using clock = std::chrono::system_clock;
26 std::stringstream output;
27 std::time_t current_time = clock::to_time_t(clock::now());
28 output << std::put_time(std::gmtime(¤t_time),
"%Y-%b-%d %T");
37 std::cout <<
"SysUtils::EnableFloatingPointExceptions() -> "
38 "Enabling floating point exception debugging\n";
39 feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
43 std::cout <<
"SysUtils::EnableFloatingPointExceptions() -> "
44 "Can't enable floating point exceptions. Available in debug mode only.\n";
Defines various stuff in namespace Utils.
std::string getenv(const std::string &name)
Returns environment variable.
void enableFloatingPointExceptions()
Enables exception throw in the case of NaN, Inf.
bool isWindowsHost()
Returns true if operation system is Windows.