lbs/lbstestutils/src/ctlbstimerutils.cpp
author Maciej Seroka <maciejs@symbian.org>
Thu, 21 Jan 2010 12:53:44 +0000
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
permissions -rw-r--r--
Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     2
// All rights reserved.
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     4
// under the terms of the License "Symbian Foundation License v1.0"
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     6
// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     7
//
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     8
// Initial Contributors:
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    10
//
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    11
// Contributors:
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    12
//
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    13
// Description:
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    14
// @file ctlbstimerutils.cpp
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    15
// 
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    16
//
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    17
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    18
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    19
#include "ctlbstimerutils.h"
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    20
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    21
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    22
/**
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    23
  Function : NewL
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    24
  Description :  It performs the two construction and returns an object
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    25
  				 of type CT_MsgTimerUtils
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    26
  @internalTechnology
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    27
  @param :
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    28
  @return : N/A
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    29
  @precondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    30
  @postcondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    31
*/
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    32
EXPORT_C CT_LbsTimerUtils* CT_LbsTimerUtils::NewL(MT_LbsTimerUtilsObserver* aObserver, TInt aTimerId)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    33
	{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    34
	CT_LbsTimerUtils* self = new(ELeave) CT_LbsTimerUtils(aObserver, aTimerId);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    35
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    36
	CleanupStack::PushL(self);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    37
	self->ConstructL();
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    38
	CleanupStack::Pop();
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    39
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    40
	return self;
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    41
	}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    42
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    43
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    44
/**
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    45
  Function : CT_MsgTimerUtils
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    46
  Description : Constructor
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    47
  @internalTechnology
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    48
  @param :
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    49
  @return : N/A
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    50
  @precondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    51
  @postcondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    52
*/
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    53
CT_LbsTimerUtils::CT_LbsTimerUtils(MT_LbsTimerUtilsObserver* aObserver, TInt aTimerId)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    54
	:
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    55
	CTimer(CTimer::EPriorityHigh),
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    56
	iObserver(aObserver),
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    57
	iTimerId(aTimerId)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    58
	{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    59
	CActiveScheduler::Add(this);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    60
	}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    61
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    62
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    63
/**
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    64
  Function : ~CT_MsgTimerUtils
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    65
  Description : Destructor
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    66
  @internalTechnology
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    67
  @param :
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    68
  @return : N/A
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    69
  @precondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    70
  @postcondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    71
*/
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    72
EXPORT_C CT_LbsTimerUtils::~CT_LbsTimerUtils()
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    73
	{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    74
	Cancel();
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    75
	}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    76
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    77
void CT_LbsTimerUtils::ConstructL()
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    78
	{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    79
	CTimer::ConstructL();
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    80
	}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    81
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    82
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    83
/**
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    84
  Function : After
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    85
  Description : Calls the After function CTimer for the given number of secs
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    86
  @internalTechnology
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    87
  @param :
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    88
  @return : N/A
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    89
  @precondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    90
  @postcondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    91
*/
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    92
EXPORT_C void CT_LbsTimerUtils::SetTimer(const TTimeIntervalMicroSeconds32 aPeriod)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    93
{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    94
	iTargetTime = 0;
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    95
	HighRes(aPeriod);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    96
}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    97
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    98
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    99
EXPORT_C void CT_LbsTimerUtils::SetTimer(const TTime& aUtcTargetTime)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   100
	{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   101
	Cancel();
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   102
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   103
	iTargetTime = aUtcTargetTime;
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   104
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   105
	TTime zeroTime(0);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   106
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   107
	if (aUtcTargetTime == zeroTime)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   108
		{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   109
		return;
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   110
		}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   111
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   112
	TTime timeNow;
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   113
	timeNow.UniversalTime();
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   114
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   115
	TTimeIntervalMicroSeconds delay(0);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   116
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   117
	if (timeNow < aUtcTargetTime)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   118
		{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   119
		delay = aUtcTargetTime.MicroSecondsFrom(timeNow);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   120
		}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   121
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   122
	TInt delay32 = static_cast<TInt>(I64LOW(delay.Int64()));
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   123
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   124
	if (delay32 < 0)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   125
		{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   126
		delay32 = 0;
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   127
		}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   128
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   129
	TTimeIntervalMicroSeconds32 time32 = TTimeIntervalMicroSeconds32(delay32);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   130
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   131
	HighRes(time32);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   132
	}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   133
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   134
EXPORT_C void CT_LbsTimerUtils::CancelTimer()
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   135
	{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   136
	Cancel();
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   137
	}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   138
	
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   139
/**
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   140
  Function : RunL
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   141
  Description : Gives the status of the operation 
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   142
  @internalTechnology
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   143
  @param :
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   144
  @return : N/A
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   145
  @precondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   146
  @postcondition : none
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   147
*/
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   148
void CT_LbsTimerUtils::RunL()
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   149
	{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   150
	if (iObserver)
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   151
		{
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   152
		iObserver->HandleTimerL(iTimerId, iTargetTime);
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   153
		}
8758140453c0 Added Symbian2 smoketests from FBF at changeset bde28f2b1d99
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   154
	}