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

Unified Diff: net/disk_cache/eviction.cc

Issue 650068: Disk cache: Use TimeTicks instead of Time for some of the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 | « net/disk_cache/entry_impl.cc ('k') | net/disk_cache/histogram_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/eviction.cc
===================================================================
--- net/disk_cache/eviction.cc (revision 39407)
+++ net/disk_cache/eviction.cc (working copy)
@@ -38,6 +38,7 @@
#include "net/disk_cache/trace.h"
using base::Time;
+using base::TimeTicks;
namespace {
@@ -83,7 +84,7 @@
Trace("*** Trim Cache ***");
trimming_ = true;
- Time start = Time::Now();
+ TimeTicks start = TimeTicks::Now();
Rankings::ScopedRankingsBlock node(rankings_);
Rankings::ScopedRankingsBlock next(rankings_,
rankings_->GetPrev(node.get(), Rankings::NO_USE));
@@ -104,7 +105,7 @@
if (!empty) {
backend_->OnEvent(Stats::TRIM_ENTRY);
- if ((Time::Now() - start).InMilliseconds() > 20) {
+ if ((TimeTicks::Now() - start).InMilliseconds() > 20) {
MessageLoop::current()->PostTask(FROM_HERE,
factory_.NewRunnableMethod(&Eviction::TrimCache, false));
break;
@@ -245,7 +246,7 @@
void Eviction::TrimCacheV2(bool empty) {
Trace("*** Trim Cache ***");
trimming_ = true;
- Time start = Time::Now();
+ TimeTicks start = TimeTicks::Now();
const int kListsToSearch = 3;
Rankings::ScopedRankingsBlock next[kListsToSearch];
@@ -296,7 +297,7 @@
if (!EvictEntry(node.get(), empty))
continue;
- if (!empty && (Time::Now() - start).InMilliseconds() > 20) {
+ if (!empty && (TimeTicks::Now() - start).InMilliseconds() > 20) {
MessageLoop::current()->PostTask(FROM_HERE,
factory_.NewRunnableMethod(&Eviction::TrimCache, false));
break;
@@ -415,7 +416,7 @@
if (backend_->disabled_)
return;
- Time start = Time::Now();
+ TimeTicks start = TimeTicks::Now();
Rankings::ScopedRankingsBlock node(rankings_);
Rankings::ScopedRankingsBlock next(rankings_,
rankings_->GetPrev(node.get(), Rankings::DELETED));
« no previous file with comments | « net/disk_cache/entry_impl.cc ('k') | net/disk_cache/histogram_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698