OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/cronet/android/metrics_util.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace cronet { |
| 10 |
| 11 int64_t MetricsUtil::ConvertTime(const base::TimeTicks& ticks, |
| 12 const base::TimeTicks& start_ticks, |
| 13 const base::Time& start_time) { |
| 14 if (ticks.is_null() || start_ticks.is_null()) { |
| 15 return -1; |
| 16 } |
| 17 DCHECK(!start_time.is_null()); |
| 18 return (start_time + (ticks - start_ticks)).ToJavaTime(); |
| 19 } |
| 20 |
| 21 } // namespace cronet |
OLD | NEW |