10 #elif defined(__APPLE__) 11 #include <mach/mach_time.h> 30 return clock() / (CLOCKS_PER_SEC / 1000);
31 #elif defined(__APPLE__) 32 mach_timebase_info_data_t timeInfo;
33 mach_timebase_info(&timeInfo);
38 return (mach_absolute_time() * timeInfo.numer / timeInfo.denom) / 1000000.0;
41 clock_gettime(CLOCK_REALTIME, &now);
46 return now.tv_sec * 1000 + now.tv_nsec / 1000000;
89 va_start(args, pFormat);
94 vsprintf(errorMsg, pFormat, args);
110 fprintf(stderr,
"* ERROR * [%s]%s: %s\n\r",
sbgErrorCodeToString(errorCode), pFunctionName, errorMsg);
116 fprintf(stderr,
"*WARNING* [%s]%s: %s\n\r",
sbgErrorCodeToString(errorCode), pFunctionName, errorMsg);
122 fprintf(stderr,
"* INFO * %s\n\r", errorMsg);
128 fprintf(stderr,
"*VERBOSE* %s\n\r", errorMsg);
134 fprintf(stderr,
"*UNKNOWN*\t[%s]%s(%u): %s\n\r",
sbgErrorCodeToString(errorCode), pFunctionName, line, errorMsg);
SBG_INLINE const char * sbgErrorCodeToString(SbgErrorCode errorCode)
enum _SbgDebugLogType SbgDebugLogType
enum _SbgErrorCode SbgErrorCode