10 static void log(
const std::string& message) {
12 std::cout <<
" " << message << std::endl;
15 static void error(
const std::string& errorMessage) {
17 std::cerr <<
" [ERROR] " << errorMessage << std::endl;
21 static void printCurrentTime() {
22 std::time_t now = std::time(
nullptr);
25 #if defined(_WIN32) || defined(_WIN64)
26 localtime_s(&timeInfo, &now);
28 localtime_r(&now, &timeInfo);
32 strftime(timestamp,
sizeof(timestamp),
"[%Y-%m-%d %H:%M:%S]", &timeInfo);
34 std::cout << timestamp;