serviceproviders/sapi_sysinfo/tsrc/dev/providertests/tsysinfoprovidertests/src/watchtimer.cpp
changeset 19 989d2f495d90
equal deleted inserted replaced
14:a36b1e19a461 19:989d2f495d90
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "watchtimer.h"
       
    20 
       
    21 CWatchTimer::CWatchTimer(TInt aPriority,MTimeOutCallBack* aCallback)
       
    22 						:CTimer(aPriority),iCallback(aCallback)
       
    23 {
       
    24 	CActiveScheduler::Add(this);
       
    25 }
       
    26 
       
    27 CWatchTimer* CWatchTimer::NewL(TInt aPriority,MTimeOutCallBack* aCallback)
       
    28 {
       
    29 	CWatchTimer* self = new (ELeave) CWatchTimer(aPriority,aCallback);
       
    30 	CleanupStack::PushL(self);
       
    31 	self->ConstructL();
       
    32 	CleanupStack::Pop(self);
       
    33 	return self;
       
    34 }
       
    35 
       
    36 void CWatchTimer::ConstructL()
       
    37 {
       
    38 	CTimer::ConstructL();
       
    39 }
       
    40 
       
    41 void CWatchTimer::RunL()
       
    42 {
       
    43 	iCallback->HandleTimeOut();
       
    44 }