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;
88 va_start(args, pFormat);
93 vsprintf(errorMsg, pFormat, args);
106 fprintf(stderr,
"*ERR * [%s]%s: %s\n\r",
sbgErrorCodeToString(errorCode), pFunctionName, errorMsg);
109 fprintf(stderr,
"*WARN* [%s]%s: %s\n\r",
sbgErrorCodeToString(errorCode), pFunctionName, errorMsg);
112 fprintf(stderr,
"*INFO* %s\n\r", errorMsg);
115 fprintf(stderr,
"*DBG * %s\n\r", errorMsg);
118 fprintf(stderr,
"*UKNW*\t[%s]%s(%u): %s\n\r",
sbgErrorCodeToString(errorCode), pFunctionName, line, errorMsg);
#define SBG_COMMON_LIB_API
#define SBG_CONFIG_LOG_MAX_SIZE
static const char * sbgErrorCodeToString(SbgErrorCode errorCode)
Main header file for SBG Systems common C library.
enum _SbgDebugLogType SbgDebugLogType
enum _SbgErrorCode SbgErrorCode