| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 "sky/scheduler/time_interval.h" | |
| 6 | |
| 7 #include <cstdlib> | |
| 8 | |
| 9 namespace sky { | |
| 10 | |
| 11 base::TimeTicks TimeInterval::NextAfter(base::TimeTicks when) { | |
| 12 int64 offset = std::abs((when - base).ToInternalValue()); | |
| 13 base::TimeDelta excess = | |
| 14 base::TimeDelta::FromInternalValue(offset % duration.ToInternalValue()); | |
| 15 return when + duration - excess; | |
| 16 } | |
| 17 } | |
| OLD | NEW |