equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2002 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: Utility class which used in logging adapter for counting time delay when calling functions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "TCADelay.h" |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // TCADelay::TCADelay |
|
27 // C++ default constructor can NOT contain any code, that |
|
28 // might leave. |
|
29 // Constructor registers the time of construction. |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 TCADelay::TCADelay() |
|
33 { |
|
34 iStart.HomeTime(); |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // TCADelay::StopAndReturn |
|
39 // Calculates time difference between construction and a call to this function. |
|
40 // Return TInt in microseconds. |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 TInt TCADelay::StopAndReturn() |
|
44 { |
|
45 iStop.HomeTime(); |
|
46 return iStop.MicroSecondsFrom( iStart ).Int64().GetTInt(); |
|
47 } |
|
48 |
|
49 |
|
50 // End of File |