mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Initialize mDelay in constructor + Set delay in Init(aDelay)
This commit is contained in:
parent
505cf9d7ac
commit
553cfc38f5
@ -83,6 +83,7 @@ void TimerImpl::FireTimeout()
|
||||
|
||||
// Always repeating here
|
||||
|
||||
// if (mRepeat)
|
||||
// mTimerId = XtAppAddTimeOut(gAppContext, GetDelay(),(XtTimerCallbackProc)nsTimerExpired, this);
|
||||
}
|
||||
|
||||
@ -94,6 +95,7 @@ TimerImpl::TimerImpl()
|
||||
mCallback = NULL;
|
||||
mNext = NULL;
|
||||
mTimerId = 0;
|
||||
mDelay = 0;
|
||||
}
|
||||
|
||||
TimerImpl::~TimerImpl()
|
||||
@ -131,7 +133,7 @@ TimerImpl::Init(nsITimerCallback *aCallback,
|
||||
nsresult
|
||||
TimerImpl::Init(PRUint32 aDelay)
|
||||
{
|
||||
|
||||
mDelay = aDelay;
|
||||
NS_ADDREF(this);
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user