fixing macOS issue

This commit is contained in:
2025-01-11 23:04:58 +01:00
parent 86709573fe
commit f4422c3174
2 changed files with 9 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
#include <mlx_profile.h>
#include <mlx.h>
#include <cstdio>
#include <cstdarg>
#include <iostream>
@@ -12,6 +13,7 @@
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <vulkan/vulkan.h>

View File

@@ -47,9 +47,15 @@ namespace mlx
default: break;
}
/*
const std::chrono::zoned_time current_time{ std::chrono::current_zone(), std::chrono::floor<std::chrono::milliseconds>(std::chrono::system_clock::now()) };
std::cout << Ansi::yellow << std::format("[{0:%H:%M:%S}] ", current_time) << Ansi::def << code_infos << message << std::endl;
*/
std::time_t now = time(0);
std::tm tstruct = *localtime(&now);
char buffer[80];
std::strftime(buffer, sizeof(buffer), "[%X] ", &tstruct);
std::cout << Ansi::yellow << buffer << Ansi::def << code_infos << message << std::endl;
if(type == LogType::FatalError)
{