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