MTimerManager Class Reference

class MTimerManager

MTimerManager provides methods for starting and stopping timers.

Member Functions Documentation

ExpiresAfter(TTimerId, TUint &)

TInt ExpiresAfter(TTimerIdaTimerId,
TUint &aExpiresAfterInMillisecs
)const [pure virtual]

Checks how long it will take until the timer expires, with the specified TimerId.

Parameters

TTimerId aTimerIdIdentifies the timer
TUint & aExpiresAfterInMillisecson return contains expires after value as milliseconds

IsRunning(TTimerId)

TBool IsRunning(TTimerIdaTimerId)const [pure virtual]

Checks if there exists a timer which hasn't expired yet, with the specified TimerId.

Parameters

TTimerId aTimerIdIdentifies the timer

StartL(MExpirationHandler *, TUint)

TTimerId StartL(MExpirationHandler *aObserver,
TUintaMilliseconds
)[pure virtual]

Creates a new timer and starts it.

Pre-condition
aObserver != NULL
See also this method 'MExpirationHandlerTimerExpiredL'

Parameters

MExpirationHandler * aObserverIN: Callback to use when timer expires. Ownership is not transferred.
TUint aMillisecondsTimer duration in milliseconds (with 32 bits, the max value is ~50 days)

StartL(MExpirationHandler *, TUint, TAny *)

TTimerId StartL(MExpirationHandler *aObserver,
TUintaMilliseconds,
TAny *aTimerParam
)[pure virtual]

Creates a new timer and starts it.

Pre-condition
aObserver != NULL
See also this method 'MExpirationHandlerTimerExpiredL'

Parameters

MExpirationHandler * aObserverIN: Callback to use when timer expires. Ownership is not transferred.
TUint aMillisecondsTimer duration in milliseconds (with 32 bits, the max value is ~50 days)
TAny * aTimerParamUser specified value which will be passed to the aObserver function MExpirationHandler::TimerExpiredL when the timer expires. Ownership isn't transferred.

Stop(TTimerId)

TInt Stop(TTimerIdaTimerId)[pure virtual]

Stops the specified timer.

This function doesn't leave in case of error, as it is thought that this function is usually also called from destructors.

Parameters

TTimerId aTimerIdIdentifies the timer to be stopped

Member Enumerations Documentation

Enum TTimerIdValues

Enumerators

KNoSuchTimer = 0
KReservedTimer = 1