equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
17 */ |
17 */ |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 #include <commdb.h> |
20 #include <commdb.h> |
21 #include <aknlistquerydialog.h> |
21 #include <aknlistquerydialog.h> |
22 #include <conntest.rsg> |
22 #include <ConnTest.rsg> |
23 |
23 |
24 #include <aknselectionlist.h> |
24 #include <aknselectionlist.h> |
25 #include <aknPopup.h> |
25 #include <aknPopup.h> |
26 #include <aknlists.h> |
26 #include <aknlists.h> |
27 #include <txtetext.h> |
27 #include <txtetext.h> |
55 // ---------------------------------------------------------------------------- |
55 // ---------------------------------------------------------------------------- |
56 // Utils::CalculateThroughput |
56 // Utils::CalculateThroughput |
57 // Calculate throughput |
57 // Calculate throughput |
58 // ---------------------------------------------------------------------------- |
58 // ---------------------------------------------------------------------------- |
59 // |
59 // |
60 void Utils::CalculateThroughput( TDes8& aBuffer, TTime aStartTime, TUint64 aSize ) |
60 void Utils::CalculateThroughput( TDes8& aBuffer, TTime aStartTime, TInt aSize ) |
61 { |
61 { |
62 TTime now; |
62 TTime now; |
63 now.UniversalTime(); |
63 now.UniversalTime(); |
64 TTimeIntervalMicroSeconds interval; |
64 TTimeIntervalMicroSeconds interval; |
65 interval = now.MicroSecondsFrom( aStartTime ); |
65 interval = now.MicroSecondsFrom( aStartTime ); |
66 TUint64 num = interval.Int64(); |
66 TInt num = I64INT(interval.Int64()); |
67 |
67 |
68 if (num != 0) |
68 if (num != 0) |
69 { |
69 { |
70 aBuffer.AppendFormat( _L8("Size: %d\n"), aSize ); |
70 aBuffer.AppendFormat( _L8("Size: %d\n"), aSize ); |
71 aBuffer.AppendFormat( _L8("Time: %4.1f s\n"), (TReal)num / 1000000 ); |
71 aBuffer.AppendFormat( _L8("Time: %4.1f s\n"), (TReal)num / 1000000 ); |