khronosfws/openmax_al/src/mmf_adaptation/sfmrlocaltimer.h
branchRCL_3
changeset 19 095bea5f582e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/sfmrlocaltimer.h	Tue Aug 31 15:43:02 2010 +0300
@@ -0,0 +1,52 @@
+/*
+ * 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: 
+ *
+ */
+
+#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();
+    virtual ~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 */