| Index: cc/timer.cc
|
| diff --git a/cc/timer.cc b/cc/timer.cc
|
| index 089c12b19b52cd876abb582f0be2d73d6bbefebe..ba698046344e5d593a790a1ef3302e1bb23641e5 100644
|
| --- a/cc/timer.cc
|
| +++ b/cc/timer.cc
|
| @@ -11,15 +11,15 @@
|
|
|
| namespace cc {
|
|
|
| -class CCTimerTask : public CCThread::Task {
|
| +class TimerTask : public Thread::Task {
|
| public:
|
| - explicit CCTimerTask(CCTimer* timer)
|
| - : CCThread::Task(0)
|
| + explicit TimerTask(Timer* timer)
|
| + : Thread::Task(0)
|
| , m_timer(timer)
|
| {
|
| }
|
|
|
| - virtual ~CCTimerTask()
|
| + virtual ~TimerTask()
|
| {
|
| if (!m_timer)
|
| return;
|
| @@ -33,7 +33,7 @@ public:
|
| if (!m_timer)
|
| return;
|
|
|
| - CCTimerClient* client = m_timer->m_client;
|
| + TimerClient* client = m_timer->m_client;
|
|
|
| m_timer->stop();
|
| if (client)
|
| @@ -41,34 +41,34 @@ public:
|
| }
|
|
|
| private:
|
| - friend class CCTimer;
|
| + friend class Timer;
|
|
|
| - CCTimer* m_timer; // null if cancelled
|
| + Timer* m_timer; // null if cancelled
|
| };
|
|
|
| -CCTimer::CCTimer(CCThread* thread, CCTimerClient* client)
|
| +Timer::Timer(Thread* thread, TimerClient* client)
|
| : m_client(client)
|
| , m_thread(thread)
|
| , m_task(0)
|
| {
|
| }
|
|
|
| -CCTimer::~CCTimer()
|
| +Timer::~Timer()
|
| {
|
| stop();
|
| }
|
|
|
| -void CCTimer::startOneShot(double intervalSeconds)
|
| +void Timer::startOneShot(double intervalSeconds)
|
| {
|
| stop();
|
|
|
| - m_task = new CCTimerTask(this);
|
| + m_task = new TimerTask(this);
|
|
|
| // The thread expects delays in milliseconds.
|
| m_thread->postDelayedTask(adoptPtr(m_task), intervalSeconds * 1000.0);
|
| }
|
|
|
| -void CCTimer::stop()
|
| +void Timer::stop()
|
| {
|
| if (!m_task)
|
| return;
|
|
|