|
1 /** |
|
2 * Copyright (c) 2008-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 |
|
19 |
|
20 /** |
|
21 @file TrackingSessionStep.h |
|
22 @internalTechnology |
|
23 */ |
|
24 #ifndef __TRACKINGSESSION_STEP_H__ |
|
25 #define __TRACKINGSESSION_STEP_H__ |
|
26 #include <test/testexecutestepbase.h> |
|
27 #include "te_defproxysuitestepbase.h" |
|
28 |
|
29 class CTrackingSessionStep : public CTe_defproxySuiteStepBase |
|
30 { |
|
31 public: |
|
32 CTrackingSessionStep(); |
|
33 ~CTrackingSessionStep(); |
|
34 virtual TVerdict doTestStepPreambleL(); |
|
35 virtual TVerdict doTestStepL(); |
|
36 virtual TVerdict doTestStepPostambleL(); |
|
37 |
|
38 // Please add/modify your class members here: |
|
39 private: |
|
40 }; |
|
41 |
|
42 _LIT(KTrackingSessionStep,"TrackingSessionStep"); |
|
43 |
|
44 class TWatch |
|
45 { |
|
46 public: |
|
47 TWatch() { RestartWatch(); }; |
|
48 void RestartWatch() { iTime.UniversalTime(); iLastTick = iTime; }; |
|
49 void Tick() { iLastTick.UniversalTime(); }; |
|
50 TTimeIntervalMicroSeconds ElapsedTotal() |
|
51 { |
|
52 TTime now; |
|
53 now.UniversalTime(); |
|
54 return now.MicroSecondsFrom(iTime); |
|
55 }; |
|
56 TTimeIntervalMicroSeconds ElapsedFromTick() |
|
57 { |
|
58 TTime now; |
|
59 now.UniversalTime(); |
|
60 return now.MicroSecondsFrom(iLastTick); |
|
61 }; |
|
62 TTime Time() { return iTime; }; |
|
63 TTime LastTick() { return iLastTick; }; |
|
64 private: |
|
65 TTime iTime; |
|
66 TTime iLastTick; |
|
67 }; |
|
68 |
|
69 #endif |