Use base::TimeTicks.
base::Time is wall clock time which might be decreased, base::TimeTicks
should be used to track the time difference.
Test: unit test
Change-Id: I1ed2c74137955a8351815ebda8e6c7330d7b1012
diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
index 80a423c..2834e61 100644
--- a/payload_consumer/delta_performer.cc
+++ b/payload_consumer/delta_performer.cc
@@ -261,7 +261,7 @@
// Update chunk index, log as needed: if forced by called, or we completed a
// progress chunk, or a timeout has expired.
- base::Time curr_time = base::Time::Now();
+ base::TimeTicks curr_time = base::TimeTicks::Now();
unsigned curr_progress_chunk =
overall_progress_ * kProgressLogMaxChunks / 100;
if (force_log || curr_progress_chunk > last_progress_chunk_ ||
@@ -1905,7 +1905,7 @@
}
bool DeltaPerformer::CheckpointUpdateProgress(bool force) {
- base::Time curr_time = base::Time::Now();
+ base::TimeTicks curr_time = base::TimeTicks::Now();
if (force || curr_time > update_checkpoint_time_) {
update_checkpoint_time_ = curr_time + update_checkpoint_wait_;
} else {