| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 TimerBase(); | 47 TimerBase(); |
| 48 explicit TimerBase(WebTaskRunner*); | 48 explicit TimerBase(WebTaskRunner*); |
| 49 virtual ~TimerBase(); | 49 virtual ~TimerBase(); |
| 50 | 50 |
| 51 void start(double nextFireInterval, double repeatInterval, const WebTraceLoc
ation&); | 51 void start(double nextFireInterval, double repeatInterval, const WebTraceLoc
ation&); |
| 52 | 52 |
| 53 void startRepeating(double repeatInterval, const WebTraceLocation& caller) | 53 void startRepeating(double repeatInterval, const WebTraceLocation& caller) |
| 54 { | 54 { |
| 55 start(repeatInterval, repeatInterval, caller); | 55 start(repeatInterval, repeatInterval, caller); |
| 56 } | 56 } |
| 57 void startOneShot(double interval, const WebTraceLocation& caller) | 57 virtual void startOneShot(double interval, const WebTraceLocation& caller) |
| 58 { | 58 { |
| 59 start(interval, 0, caller); | 59 start(interval, 0, caller); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void stop(); | 62 void stop(); |
| 63 bool isActive() const; | 63 bool isActive() const; |
| 64 const WebTraceLocation& location() const { return m_location; } | 64 const WebTraceLocation& location() const { return m_location; } |
| 65 | 65 |
| 66 double nextFireInterval() const; | 66 double nextFireInterval() const; |
| 67 double repeatInterval() const { return m_repeatInterval; } | 67 double repeatInterval() const { return m_repeatInterval; } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 213 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
| 214 inline bool TimerBase::isActive() const | 214 inline bool TimerBase::isActive() const |
| 215 { | 215 { |
| 216 ASSERT(m_thread == currentThread()); | 216 ASSERT(m_thread == currentThread()); |
| 217 return m_cancellableTimerTask; | 217 return m_cancellableTimerTask; |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace blink | 220 } // namespace blink |
| 221 | 221 |
| 222 #endif // Timer_h | 222 #endif // Timer_h |
| OLD | NEW |