equal
deleted
inserted
replaced
170 TShwAutoPtr< CPeriodic > timer = CPeriodic::NewL( CActive::EPriorityStandard ); |
170 TShwAutoPtr< CPeriodic > timer = CPeriodic::NewL( CActive::EPriorityStandard ); |
171 // start a timer to stop the asynch loop since we dont expect the |
171 // start a timer to stop the asynch loop since we dont expect the |
172 // iCShwTimerControl to send any event |
172 // iCShwTimerControl to send any event |
173 // start asynch wait for 1 second |
173 // start asynch wait for 1 second |
174 iStoppedForTimer = EFalse; |
174 iStoppedForTimer = EFalse; |
175 timer->Start( |
175 timer->Start(1 * 1000000, 1 * 1000000, TShwCallBack<T_CShwTimerControl, |
176 1 * 1000000, |
176 &T_CShwTimerControl::TimerCallBack> (this)); |
177 1 * 1000000, |
|
178 TShwCallBack< T_CShwTimerControl, TimerCallBack >( this ) ); |
|
179 |
177 |
180 // Need to let the scheduler loop |
178 // Need to let the scheduler loop |
181 iWait.Start(); |
179 iWait.Start(); |
182 timer->Cancel(); |
180 timer->Cancel(); |
183 |
181 |
189 TShwEventResume resume; |
187 TShwEventResume resume; |
190 iCShwTimerControl->NotifyL( &resume ); |
188 iCShwTimerControl->NotifyL( &resume ); |
191 |
189 |
192 // start the timer again |
190 // start the timer again |
193 iStoppedForTimer = EFalse; |
191 iStoppedForTimer = EFalse; |
194 timer->Start( |
192 timer->Start(1 * 1000000, 1 * 1000000, TShwCallBack<T_CShwTimerControl, |
195 1 * 1000000, |
193 &T_CShwTimerControl::TimerCallBack> (this)); |
196 1 * 1000000, |
|
197 TShwCallBack< T_CShwTimerControl, TimerCallBack >( this ) ); |
|
198 |
194 |
199 // Need to let the scheduler loop |
195 // Need to let the scheduler loop |
200 iWait.Start(); |
196 iWait.Start(); |
201 timer->Cancel(); |
197 timer->Cancel(); |
202 |
198 |
213 // start the timer again |
209 // start the timer again |
214 iStoppedForTimer = EFalse; |
210 iStoppedForTimer = EFalse; |
215 timer->Start( |
211 timer->Start( |
216 1 * 1000000, |
212 1 * 1000000, |
217 1 * 1000000, |
213 1 * 1000000, |
218 TShwCallBack< T_CShwTimerControl, TimerCallBack >( this ) ); |
214 TShwCallBack<T_CShwTimerControl, |
|
215 &T_CShwTimerControl::TimerCallBack> (this)); |
219 // Need to let the scheduler loop |
216 // Need to let the scheduler loop |
220 iWait.Start(); |
217 iWait.Start(); |
221 timer->Cancel(); |
218 timer->Cancel(); |
222 EUNIT_ASSERT_DESC( iStoppedForTimer, "stopped in timer, SendEventL not called" ); |
219 EUNIT_ASSERT_DESC( iStoppedForTimer, "stopped in timer, SendEventL not called" ); |
223 EUNIT_ASSERT_DESC( !iEvent, "event was not received" ); |
220 EUNIT_ASSERT_DESC( !iEvent, "event was not received" ); |