Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_CONVERTER_H_ | |
| 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_CONVERTER_H_ | |
| 7 | |
| 8 #include "base/time/time.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 namespace scheduler { | |
| 12 | |
| 13 // TODO(scheduler-dev): Remove conversions when Blink starts using | |
| 14 // base::TimeTicks instead of doubles for time. | |
| 15 static inline base::TimeTicks MonotonicTimeInSecondsToTimeTicks( | |
| 16 double monotonicTimeInSeconds) { | |
| 17 return base::TimeTicks() + | |
| 18 base::TimeDelta::FromSecondsD(monotonicTimeInSeconds); | |
|
kinuko
2017/03/22 09:41:10
Ended up factoring out this simple inline method b
Sami
2017/03/22 18:56:43
Seems like a good idea, thanks!
| |
| 19 } | |
| 20 | |
| 21 } // namespace scheduler | |
| 22 } // namespace blink | |
| 23 | |
| 24 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_CONVERTER_H_ | |
| OLD | NEW |