khronosfws/openmax_al/src/mmf_adaptation/sfmrlocaltimer.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 15:29:42 +0300
changeset 12 5a06f39ad45b
child 25 6f7ceef7b1d1
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/
// sfmrlocaltimer.h

#ifndef SFMRLOCALTIMER_H
#define SFMRLOCALTIMER_H

#include <e32base.h>
class CMMFBackendEngine;

NONSHARABLE_CLASS(LocalTimer) : public CActive
    {
public:
    // Construct/destruct
    LocalTimer(CMMFBackendEngine* parent, void* adaptContext);
    TInt PostInit();
    ~LocalTimer();

public:
    // Starts ticking after every aDelay microsecs
    void Start(TUint64 aDelay);
    void Stop();
    void ResetTime();
    TUint64 GetTime();

protected:
    // From CActive
    void RunL();
    void DoCancel();


private:
    RTimer iTimer;      // Has
    TUint64 iTime;
    TUint64 iDelay;
    CMMFBackendEngine* iParent;
    void* iAdaptContext;
    };

#endif /* SFMRLOCALTIMER_H */