Index: source/lib/timer.cpp =================================================================== --- source/lib/timer.cpp +++ source/lib/timer.cpp @@ -59,7 +59,7 @@ // rationale for wrapping gettimeofday and clock_gettime, instead of just // emulating them where not available: allows returning higher-resolution -// timer values than their us / ns interface, via double [seconds]. +// timer values than their µs / ns interface, via double [seconds]. // they're also not guaranteed to be monotonic. #if HAVE_CLOCK_GETTIME @@ -105,12 +105,12 @@ ENSURE(start.tv_sec || start.tv_nsec); // must have called timer_LatchStartTime first struct timespec cur; (void)clock_gettime(CLOCK_REALTIME, &cur); - t = (cur.tv_sec - start.tv_sec) + (cur.tv_nsec - start.tv_nsec)*1e-9; + t = (cur.tv_sec - start.tv_sec) + (cur.tv_nsec - start.tv_nsec) * 1e-9; #elif HAVE_GETTIMEOFDAY ENSURE(start.tv_sec || start.tv_usec); // must have called timer_LatchStartTime first struct timeval cur; gettimeofday(&cur, 0); - t = (cur.tv_sec - start.tv_sec) + (cur.tv_usec - start.tv_usec)*1e-6; + t = (cur.tv_sec - start.tv_sec) + (cur.tv_usec - start.tv_usec) * 1e-6; #else # error "timer_Time: add timer implementation for this platform!" #endif @@ -198,14 +198,14 @@ std::string StringForSeconds(double seconds) { double scale = 1e6; - const char* unit = " us"; + const char* unit = " µs"; if(seconds > 1.0) scale = 1, unit = " s"; else if(seconds > 1e-3) scale = 1e3, unit = " ms"; std::stringstream ss; - ss << seconds*scale; + ss << seconds * scale; ss << unit; return ss.str(); } @@ -223,7 +223,7 @@ scale = 1e-3, unit = " kc"; std::stringstream ss; - ss << cycles*scale; + ss << cycles * scale; ss << unit; return ss.str(); } Index: source/ps/Profiler2.cpp =================================================================== --- source/ps/Profiler2.cpp +++ source/ps/Profiler2.cpp @@ -602,7 +602,7 @@ std::string basic = attrib; std::map::iterator time_attrib = time_per_attribute.find(attrib); if (time_attrib != time_per_attribute.end()) - basic += " " + CStr::FromInt(1000000*time_attrib->second) + "us"; + basic += " " + CStr::FromInt(1000000 * time_attrib->second) + "µs"; u32 length = basic.size(); memcpy(buffer + writePos, &length, sizeof(length));