khronosfws/openmax_al/src/mmf_adaptation/sfmrlocaltimer.h
branchRCL_3
changeset 20 0ac9a5310753
parent 19 095bea5f582e
child 21 999b2818a0eb
equal deleted inserted replaced
19:095bea5f582e 20:0ac9a5310753
     1 /*
       
     2  * Copyright (c) 2009 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 #ifndef SFMRLOCALTIMER_H
       
    19 #define SFMRLOCALTIMER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 class CMMFBackendEngine;
       
    23 
       
    24 NONSHARABLE_CLASS(LocalTimer) : public CActive
       
    25     {
       
    26 public:
       
    27     // Construct/destruct
       
    28     LocalTimer(CMMFBackendEngine* parent, void* adaptContext);
       
    29     TInt PostInit();
       
    30     virtual ~LocalTimer();
       
    31 
       
    32 public:
       
    33     // Starts ticking after every aDelay microsecs
       
    34     void Start(TUint64 aDelay);
       
    35     void Stop();
       
    36     void ResetTime();
       
    37     TUint64 GetTime();
       
    38 
       
    39 protected:
       
    40     // From CActive
       
    41     void RunL();
       
    42     void DoCancel();
       
    43 
       
    44 private:
       
    45     RTimer iTimer; // Has
       
    46     TUint64 iTime;
       
    47     TUint64 iDelay;
       
    48     CMMFBackendEngine* iParent;
       
    49     void* iAdaptContext;
       
    50     };
       
    51 
       
    52 #endif /* SFMRLOCALTIMER_H */