tsrc/xmltestharness/xmlclient/src/videotesttimer.cpp
changeset 0 0e4a32b9112d
equal deleted inserted replaced
-1:000000000000 0:0e4a32b9112d
       
     1 /*
       
     2 * Copyright (c) 2008 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 "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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "videotesttimer.h"
       
    21 
       
    22 
       
    23 CVideoTestTimer::CVideoTestTimer(MTimerObserver& aTimerObserver) 
       
    24 : CTimer(EPriorityHigh), iTimerObserver(aTimerObserver)
       
    25 	{
       
    26 	CActiveScheduler::Add(this);
       
    27 	}
       
    28 
       
    29 CVideoTestTimer* CVideoTestTimer::NewL(MTimerObserver& aTimerObserver)
       
    30 	{
       
    31 	CVideoTestTimer* self = new (ELeave) CVideoTestTimer(aTimerObserver);
       
    32 	CleanupStack::PushL(self);
       
    33 	self->ConstructL(); // this call CTimer::ConstructL
       
    34 	CleanupStack::Pop(self);
       
    35 	return self;
       
    36 	}
       
    37 
       
    38 CVideoTestTimer::~CVideoTestTimer()
       
    39 	{
       
    40 	// cancel is called by CTimer destructor
       
    41 	}
       
    42 
       
    43 /** Start the timer */
       
    44 void CVideoTestTimer::Start(TTimeIntervalMicroSeconds32 aDelay)
       
    45 	{
       
    46 	HighRes(aDelay);
       
    47 	}
       
    48 
       
    49 /** Handle completion */
       
    50 void CVideoTestTimer::RunL()
       
    51 	{
       
    52 	if (iStatus == KErrNone)
       
    53 		{
       
    54 		iTimerObserver.TimerExpired();
       
    55 		}
       
    56 	}