Chromium Code Reviews| Index: base/time.cc |
| =================================================================== |
| --- base/time.cc (revision 13095) |
| +++ base/time.cc (working copy) |
| @@ -60,6 +60,12 @@ |
| return (us_ - kTimeTToMicrosecondsOffset) / kMicrosecondsPerSecond; |
| } |
| +// static |
| +Time Time::FromDoubleT(double dt) { |
| + return (dt * static_cast<double>(kMicrosecondsPerSecond)) + |
| + kTimeTToMicrosecondsOffset; |
| +} |
| + |
| double Time::ToDoubleT() const { |
| if (us_ == 0) |
| return 0; // Preserve 0 so we can tell it doesn't exist. |