Lines Matching defs:time
104 static std::string FormatTime(double time) {
105 // For the time columns of the console printer 13 digits are reserved. One of
106 // them is a space and max two of them are the time unit (e.g ns). That puts
109 if (time < 1.0) {
110 return FormatString("%10.3f", time);
112 if (time < 10.0) {
113 return FormatString("%10.2f", time);
115 if (time < 100.0) {
116 return FormatString("%10.1f", time);
118 // Assuming the time is at max 9.9999e+99 and we have 10 digits for the
120 if (time > 9999999999 /*max 10 digit number*/) {
121 return FormatString("%1.4e", time);
123 return FormatString("%10.0f", time);