Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3373)

Unified Diff: base/profiler/tracked_time.cc

Issue 2956683002: chrome://profiler infrastructure uses base time types. (Closed)
Patch Set: Address nit. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/profiler/tracked_time.h ('k') | base/profiler/tracked_time_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/tracked_time.cc
diff --git a/base/profiler/tracked_time.cc b/base/profiler/tracked_time.cc
deleted file mode 100644
index 7e0040c03c85cdb64a2f5bbf35438ed804ded254..0000000000000000000000000000000000000000
--- a/base/profiler/tracked_time.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/profiler/tracked_time.h"
-
-#include "build/build_config.h"
-
-#if defined(OS_WIN)
-#include <mmsystem.h> // Declare timeGetTime()... after including build_config.
-#endif
-
-namespace tracked_objects {
-
-Duration::Duration() : ms_(0) {}
-Duration::Duration(int32_t duration) : ms_(duration) {}
-
-Duration& Duration::operator+=(const Duration& other) {
- ms_ += other.ms_;
- return *this;
-}
-
-Duration Duration::operator+(const Duration& other) const {
- return Duration(ms_ + other.ms_);
-}
-
-bool Duration::operator==(const Duration& other) const {
- return ms_ == other.ms_;
-}
-
-bool Duration::operator!=(const Duration& other) const {
- return ms_ != other.ms_;
-}
-
-bool Duration::operator>(const Duration& other) const {
- return ms_ > other.ms_;
-}
-
-// static
-Duration Duration::FromMilliseconds(int ms) { return Duration(ms); }
-
-int32_t Duration::InMilliseconds() const {
- return ms_;
-}
-
-//------------------------------------------------------------------------------
-
-TrackedTime::TrackedTime() : ms_(0) {}
-TrackedTime::TrackedTime(int32_t ms) : ms_(ms) {}
-TrackedTime::TrackedTime(const base::TimeTicks& time)
- : ms_(static_cast<int32_t>((time - base::TimeTicks()).InMilliseconds())) {}
-
-// static
-TrackedTime TrackedTime::Now() {
- return TrackedTime(base::TimeTicks::Now());
-}
-
-Duration TrackedTime::operator-(const TrackedTime& other) const {
- return Duration(ms_ - other.ms_);
-}
-
-TrackedTime TrackedTime::operator+(const Duration& other) const {
- return TrackedTime(ms_ + other.ms_);
-}
-
-bool TrackedTime::is_null() const { return ms_ == 0; }
-
-} // namespace tracked_objects
« no previous file with comments | « base/profiler/tracked_time.h ('k') | base/profiler/tracked_time_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698