9#include "fireset/fstime.h"
11static double s_log_start_time = 0.0;
35static const char* FS_ERROR_STRING[FS_SEV_COUNT] = {
42static const char* FS_MODULE_STRING[FS_MOD_COUNT] = {
53static const char* FS_ERROR_COLOR[FS_SEV_COUNT] = {
60static inline void fsLogInit(
void){
64static inline void fsLog(FS_SEVERITY sev, FS_MODULE mod,
const char* fmt, ...){
65 if (sev < 0 || sev >= FS_SEV_COUNT)
return;
66 if (mod < 0 || mod >= FS_MOD_COUNT)
return;
70 unsigned long long totalMs = (
unsigned long long)(time * 1000.0);
72 unsigned long long ms = totalMs % 1000;
73 unsigned long long totalSeconds = totalMs / 1000;
75 unsigned long long s = totalSeconds % 60;
76 unsigned long long m = (totalSeconds / 60) % 60;
77 unsigned long long h = totalSeconds / 3600;
80 "[%02lld:%02lld:%02lld.%03lld][%s%s\033[0m][%s] ",
95 if (sev == FS_FATAL) exit(EXIT_FAILURE);
double fsTimeGetSystemTime(void)
Returns the current system time.
double fsTimeGetTime(void)
Returns the engine running time.
Definition fstime.c:72