void DumpSystemToLog() { CPUInfo cpu; WCHAR wszTime[9], wszDate[9]; _wstrtime_s(wszTime, 9); _wstrdate_s(wszDate, 9); LOG_INFO(" -- System To Log --"); #if defined(DEBUG) || defined(_DEBUG) LOG_INFO("RUNNING -DEBUG- BUILD AT: " << wszDate << " -- " << wszTime ); #else LOG_INFO("RUNNING -RELEASE- BUILD AT: " << wszDate << " -- " << wszTime ); #endif LOG_INFO(""); LOG_INFO(DXUTGetWindowTitle()); LOG_INFO("Processor Speed: " << cpu.GetProcessorClockFrequency() << "MHz"); LOG_INFO("Processors: " << cpu.GetLogicalProcessorsPerPhysical()); LOG_INFO("Processor: " << cpu.GetExtendedProcessorName()); LOG_INFO(DXUTGetFrameStats(false)); LOG_INFO(DXUTGetDeviceStats()); LOG_INFO(""); dprintf("Processor Speed: %dMHz\n", cpu.GetProcessorClockFrequency()); dprintf("Processors: %d\n", cpu.GetLogicalProcessorsPerPhysical()); dprintf("Processor: %s\n", cpu.GetExtendedProcessorName()); char pszDest[256]; WCharStringToCharString(DXUTGetFrameStats(false), pszDest, 255); dprintf("STATS:\n%s\n", pszDest); WCharStringToCharString(DXUTGetDeviceStats(), pszDest, 255); dprintf("%s\n", pszDest); dprintf("\n\n"); }
static void get_cpu_freq( char* dest ) { sprintf( dest, "%dMHz\n", cpu_info.GetProcessorClockFrequency() ); }