summaryrefslogtreecommitdiffstats
path: root/base/time.cc
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-13 15:20:06 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-13 15:20:06 +0000
commit9155d5610ba464d0717d536371ff002b4406b0ab (patch)
treea56741d9c711553ccc6055f96cd616013f2fb917 /base/time.cc
parent8b5ac3aa3be206660efb5ac4f95ab48c4dab117e (diff)
downloadchromium_src-9155d5610ba464d0717d536371ff002b4406b0ab.zip
chromium_src-9155d5610ba464d0717d536371ff002b4406b0ab.tar.gz
chromium_src-9155d5610ba464d0717d536371ff002b4406b0ab.tar.bz2
Inline the TimeDelta::From* construction functions.
With GCC, we don't have much hope of inlining unless the defintion is in the header. This should also hopefully allow the compiler to do things like constant folding on the multiplications, etc. Review URL: http://codereview.chromium.org/17802 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7928 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time.cc')
-rw-r--r--base/time.cc30
1 files changed, 0 insertions, 30 deletions
diff --git a/base/time.cc b/base/time.cc
index 83b5c09..12519aa 100644
--- a/base/time.cc
+++ b/base/time.cc
@@ -12,36 +12,6 @@ namespace base {
// TimeDelta ------------------------------------------------------------------
-// static
-TimeDelta TimeDelta::FromDays(int64 days) {
- return TimeDelta(days * Time::kMicrosecondsPerDay);
-}
-
-// static
-TimeDelta TimeDelta::FromHours(int64 hours) {
- return TimeDelta(hours * Time::kMicrosecondsPerHour);
-}
-
-// static
-TimeDelta TimeDelta::FromMinutes(int64 minutes) {
- return TimeDelta(minutes * Time::kMicrosecondsPerMinute);
-}
-
-// static
-TimeDelta TimeDelta::FromSeconds(int64 secs) {
- return TimeDelta(secs * Time::kMicrosecondsPerSecond);
-}
-
-// static
-TimeDelta TimeDelta::FromMilliseconds(int64 ms) {
- return TimeDelta(ms * Time::kMicrosecondsPerMillisecond);
-}
-
-// static
-TimeDelta TimeDelta::FromMicroseconds(int64 us) {
- return TimeDelta(us);
-}
-
int TimeDelta::InDays() const {
return static_cast<int>(delta_ / Time::kMicrosecondsPerDay);
}