MTimerManager Class Reference

class MTimerManager

MTimerManager provides methods for starting and stopping timers.

Member Functions Documentation

ExpiresAfter(TTimerId, TUint &)

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

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

Parameters

TTimerId aTimerId Identifies the timer
TUint & aExpiresAfterInMillisecs on return contains expires after value as milliseconds

IsRunning(TTimerId)

TBool IsRunning ( TTimerId aTimerId ) const [pure virtual]

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

Parameters

TTimerId aTimerId Identifies the timer

StartL(MExpirationHandler *, TUint)

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

Creates a new timer and starts it.

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

Parameters

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

StartL(MExpirationHandler *, TUint, TAny *)

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

Creates a new timer and starts it.

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

Parameters

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

Stop(TTimerId)

TInt Stop ( TTimerId aTimerId ) [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 aTimerId Identifies the timer to be stopped

Member Enumerations Documentation

Enum TTimerIdValues

Enumerators

KNoSuchTimer = 0
KReservedTimer = 1