mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
fixing macOS issue
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <mlx_profile.h>
|
#include <mlx_profile.h>
|
||||||
#include <mlx.h>
|
#include <mlx.h>
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <ctime>
|
||||||
|
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
|
|
||||||
|
|||||||
@@ -47,9 +47,15 @@ namespace mlx
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
const std::chrono::zoned_time current_time{ std::chrono::current_zone(), std::chrono::floor<std::chrono::milliseconds>(std::chrono::system_clock::now()) };
|
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::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)
|
if(type == LogType::FatalError)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user