| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 if (*p == '%') { | 1144 if (*p == '%') { |
| 1145 p++; | 1145 p++; |
| 1146 switch (*p) { | 1146 switch (*p) { |
| 1147 case '\0': | 1147 case '\0': |
| 1148 // If there's a % at the end of the string we back up | 1148 // If there's a % at the end of the string we back up |
| 1149 // one character so we can escape the loop properly. | 1149 // one character so we can escape the loop properly. |
| 1150 p--; | 1150 p--; |
| 1151 break; | 1151 break; |
| 1152 case 't': { | 1152 case 't': { |
| 1153 // %t expands to the current time in milliseconds. | 1153 // %t expands to the current time in milliseconds. |
| 1154 uint32_t time = static_cast<uint32_t>(OS::TimeCurrentMillis()); | 1154 double time = OS::TimeCurrentMillis(); |
| 1155 stream.Add("%u", time); | 1155 stream.Add("%.0f", FmtElm(time)); |
| 1156 break; | 1156 break; |
| 1157 } | 1157 } |
| 1158 case '%': | 1158 case '%': |
| 1159 // %% expands (contracts really) to %. | 1159 // %% expands (contracts really) to %. |
| 1160 stream.Put('%'); | 1160 stream.Put('%'); |
| 1161 break; | 1161 break; |
| 1162 default: | 1162 default: |
| 1163 // All other %'s expand to themselves. | 1163 // All other %'s expand to themselves. |
| 1164 stream.Put('%'); | 1164 stream.Put('%'); |
| 1165 stream.Put(*p); | 1165 stream.Put(*p); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 // Otherwise, if the sliding state window computation has not been | 1250 // Otherwise, if the sliding state window computation has not been |
| 1251 // started we do it now. | 1251 // started we do it now. |
| 1252 if (sliding_state_window_ == NULL) { | 1252 if (sliding_state_window_ == NULL) { |
| 1253 sliding_state_window_ = new SlidingStateWindow(); | 1253 sliding_state_window_ = new SlidingStateWindow(); |
| 1254 } | 1254 } |
| 1255 #endif | 1255 #endif |
| 1256 } | 1256 } |
| 1257 | 1257 |
| 1258 | 1258 |
| 1259 } } // namespace v8::internal | 1259 } } // namespace v8::internal |
| OLD | NEW |