• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TTimeIntervalMicroSeconds32类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中TTimeIntervalMicroSeconds32的典型用法代码示例。如果您正苦于以下问题:C++ TTimeIntervalMicroSeconds32类的具体用法?C++ TTimeIntervalMicroSeconds32怎么用?C++ TTimeIntervalMicroSeconds32使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TTimeIntervalMicroSeconds32类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: QObject

/*
 * QS60KeyCapture provides media key handling using services from RemCon.
 */
QS60KeyCapture::QS60KeyCapture(CCoeEnv *env, QObject *parent):
    QObject(parent), coeEnv(env), selector(0), target(0), handler(0)
{
    initRemCon();

    TTimeIntervalMicroSeconds32 initialTime;
    TTimeIntervalMicroSeconds32 time;
    coeEnv->WsSession().GetKeyboardRepeatRate(initialTime, time);
    initialRepeatTime = (initialTime.Int() / 1000); // msecs
    repeatTime = (time.Int() / 1000); // msecs

    int clickTimeout = initialRepeatTime + repeatTime;

    volumeUpClickTimer.setSingleShot(true);
    volumeDownClickTimer.setSingleShot(true);
    repeatTimer.setSingleShot(true);

    volumeUpClickTimer.setInterval(clickTimeout);
    volumeDownClickTimer.setInterval(clickTimeout);
    repeatTimer.setInterval(initialRepeatTime);

    connect(&volumeUpClickTimer, SIGNAL(timeout()), this, SLOT(volumeUpClickTimerExpired()));
    connect(&volumeDownClickTimer, SIGNAL(timeout()), this, SLOT(volumeDownClickTimerExpired()));
    connect(&repeatTimer, SIGNAL(timeout()), this, SLOT(repeatTimerExpired()));
}
开发者ID:BGmot,项目名称:Qt,代码行数:28,代码来源:qs60keycapture.cpp


示例2: INFO_PRINTF1

void CSmsReplyToStep::StartWatcherL()
	{
	INFO_PRINTF1(_L("Start the Watcher"));

	if( WatchersAlreadyRunningL() )
		{
		INFO_PRINTF1(_L("Watchers are already running\n"));
		return;
		}

	iWatchers = CTestUtilsWatcherStarter::NewL();

	TTimeIntervalMicroSeconds32 wait = KWaitForWatchersToStart;
	TBool started = EFalse;
	while( !started && wait.Int() > 0 )
		{
		INFO_PRINTF2(_L("Waiting %d secs for watchers to start..."), wait.Int() / 1000000);
		wait = wait.Int() - KWaitForWatchersToStartDisplayInterval.Int();
		User::After(KWaitForWatchersToStartDisplayInterval);
		started = WatchersAlreadyRunningL();
		}

	if( !WatchersAlreadyRunningL() )
		{
		INFO_PRINTF1(_L("WARNING: NBS Watcher has not started yet\n"));
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:27,代码来源:t_SmsReplyToStep.cpp


示例3: DoRunSendingL

void CSmsCancelTest::DoRunSendingL()
	{
	CActiveScheduler::Stop();

	if (!iOperation) //scheduled
		{
		TTimeIntervalMicroSeconds32 wait = 5000000;
		iSmsTest.Printf(_L("\nWaiting %d seconds for SMSS to complete...\n\n"), wait.Int() / 1000000);
		User::After(wait);
		}

	if (iStatus == KErrNone)
		iStatus = iSmsTest.iProgress.iError;

	iState = EStateWaiting;
	iSmsTest.Printf(_L("Sending completed with error %d\n"), iStatus);

	if (iStatus == KErrCancel)
		{
		iSmsTest.Printf(_L("Error %d is expected and OK\n"), iStatus);
		iStatus = KErrNone;
		}

	iSmsTest.Printf(_L("Final Sending States of Messages:\n\n"), iStatus);
	iSmsTest.DisplaySendingStatesL(*iSelection);

	if (!iSmsTest.RunAuto())
		{
		iSmsTest.Test().Printf(_L("\nPress any key to continue...\n"));
		iSmsTest.Test().Getch();
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:32,代码来源:T_SmsCancel.cpp


示例4: OstTraceExt3

// ---------------------------------------------------------------------------
// Configures the flex window sizes for both the initial delay and the
// consequent intervals after that.
// ---------------------------------------------------------------------------
//
EXPORT_C TInt CFlexPeriodic::Configure(
                                 TTimeIntervalMicroSeconds32 aDelayWindow,
                                 TTimeIntervalMicroSeconds32 aIntervalWindow )
    {

    OstTraceExt3( TRACE_NORMAL, CFLEXPERIODIC_CONFIGURE,
            "CFlexPeriodic::Configure32;this=%x;"
            "aDelayWindow=%d;aIntervalWindow=%d", ( TUint )this,
            aDelayWindow.Int(), aIntervalWindow.Int() );

    TTimeIntervalMicroSeconds32 zero( 0 );
    __ASSERT_ALWAYS(aDelayWindow >= zero,
            User::Panic(KCFlexPeriodicPanicCat,
                    EFlexPeriodicDelayWindowLessThanZero));
    __ASSERT_ALWAYS(aIntervalWindow >= zero,
            User::Panic(KCFlexPeriodicPanicCat,
                    EFlexPeriodicIntervalWindowLessThanZero));

    // interval window is saved for later use. Delay window is sent
    // immediately to server. 
    TInt ret = CFlexTimer::Configure( aDelayWindow );
    if ( ret == KErrNone )
        {
        // Interval window is changed only, if configuration is successful.
        iIntervalWindow = MAKE_TINT64( 0, aIntervalWindow.Int() );
        iSendConfigure = ETrue;
        }
    return ret;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:34,代码来源:flexperiodic.cpp


示例5: OstTraceExt4

// ---------------------------------------------------------------------------
// Starts the periodic timer. 32-bit delay and interval parameters.
// ---------------------------------------------------------------------------
//
EXPORT_C void CFlexPeriodic::Start( TTimeIntervalMicroSeconds32 aDelay,
                                    TTimeIntervalMicroSeconds32 anInterval,
                                    TCallBack aCallBack,
                                    TCallBack aCallBackError )
    {
    OstTraceExt4( TRACE_NORMAL, CFLEXPERIODIC_START32,
            "CFlexPeriodic::Start32;this=%x;aDelay=%d;"
            "anInterval=%d;aCallBack=%x", ( TUint )this,
            aDelay.Int(), anInterval.Int(), ( TUint )&( aCallBack ) );

    TTimeIntervalMicroSeconds32 zero( 0 );
    __ASSERT_ALWAYS(aDelay >= zero,
            User::Panic(KCFlexPeriodicPanicCat,
                    EFlexPeriodicDelayLessThanZero));
    __ASSERT_ALWAYS(anInterval > zero,
            User::Panic(KCFlexPeriodicPanicCat,
                    EFlexPeriodicIntervalTooSmall));
    __ASSERT_ALWAYS( aCallBack.iFunction != NULL,
            User::Panic(KCFlexPeriodicPanicCat,
                    EFlexPeriodicCallbackFunctionIsNull));
    // aCallBackError is left unasserted on purpose.
    // if error occurs and callback is null client is paniced.

    // Interval value is saved for later use, delay is sent immediately
    // to the server.
    iInterval = MAKE_TINT64( 0, anInterval.Int() );
    iCallBack = aCallBack;
    iCallBackError = aCallBackError;
    CFlexTimer::After( aDelay );
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:34,代码来源:flexperiodic.cpp


示例6: IsDelayOk

// ---------------------------------------------------------------------------
TBool CTestRFlexTimer::IsDelayOk( 
    const TTimeIntervalMicroSeconds aDelay,
    const TTimeIntervalMicroSeconds32 aInterval,
    const TTimeIntervalMicroSeconds32 aWindow )
    {
    TTimeIntervalMicroSeconds interval( aInterval.Int() );
    TTimeIntervalMicroSeconds window( aWindow.Int() );
    return IsDelayOk( aDelay, interval, window );
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:10,代码来源:testrflextimer.cpp


示例7: SDL_StartTicks

void SDL_StartTicks(void)
	{
	/* Set first ticks value */
    start = User::TickCount();

    TTimeIntervalMicroSeconds32 period;
	TInt tmp = UserHal::TickPeriod(period);
    tickPeriodMilliSeconds = period.Int() / 1000;
	}
开发者ID:00wendi00,项目名称:MyProject,代码行数:9,代码来源:SDL_systimer.cpp


示例8: ThreadSleepTicks

void ThreadSleepTicks(systick_t Ticks)
{
    if (Ticks)
    {
        TTimeIntervalMicroSeconds32 n;
	    UserHal::TickPeriod(n);
        Ticks *= n.Int();
    }
	User::After(Ticks);
}
开发者ID:ViFork,项目名称:ResInfo,代码行数:10,代码来源:multithread_symbian.cpp


示例9: requeuePrevious

TInt requeuePrevious(TAny * anArg)
//
// Requeue the previous entry (assumes previous entry is valid handle)
//
	{
	TTimeIntervalMicroSeconds32 tickPeriod;
	UserHal::TickPeriod(tickPeriod);
	const TInt K13Ticks = 13 * tickPeriod.Int();

	TInt index=(TInt)anArg - 1;
	theTimer->Queue(K13Ticks,TheTimers[index]);
	return print(anArg);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:13,代码来源:t_dtim.cpp


示例10: requeue

TInt requeue(TAny * anArg)
//
// Note that a requeue will run once every 200 ms until stop is called.
//
	{
	TTimeIntervalMicroSeconds32 tickPeriod;
	UserHal::TickPeriod(tickPeriod);
	const TInt K13Ticks = 13 * tickPeriod.Int();

	TInt index=(TInt)anArg;
	theTimer->Queue(K13Ticks*2/3,TheTimers[index]);
	return print(anArg);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:13,代码来源:t_dtim.cpp


示例11: QueueTimer

void CPhoneFactoryDummyBase::QueueTimer(TTsyTimer& aTsyTimer,
						const TTsyReqHandle aTsyReqHandle,
						TTimeIntervalMicroSeconds32 aTimeInMicroSeconds,
						TInt (*aFunction)(TAny *aPtr),TAny* aPtr)
	{
	TCallBack callBackFn(aFunction,aPtr);
 	aTsyTimer.iEntry.Set(callBackFn);

	aTsyTimer.iPending=ETrue;
	aTsyTimer.iTsyReqHandle=aTsyReqHandle;
	aTimeInMicroSeconds=aTimeInMicroSeconds.Int()+(KEtelTimerGranularity>>2);
	if(aTimeInMicroSeconds.Int()<100000)
		aTimeInMicroSeconds=aTimeInMicroSeconds.Int()+KEtelTimerGranularity;
	iTimer->Queue(aTimeInMicroSeconds,aTsyTimer.iEntry);
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:15,代码来源:ACQUIRE.CPP


示例12: Queue

void CWsDeltaTimer::Queue(TTimeIntervalMicroSeconds32 aTimeInMicroSeconds,TWsDeltaTimerEntry& anEntry)
	{
	TInt intervals=aTimeInMicroSeconds.Int()/CWsDeltaTimerGranularity;
	if (intervals==0)
		intervals=1;
	iQueue.Add(anEntry,intervals);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:7,代码来源:SPRITE.CPP


示例13: KInterval

// ---------------------------------------------------------------------------
// TEST CASE: Start a timer using AfterTicks and wait it to expire.
// ---------------------------------------------------------------------------
//
TInt CTestRFlexTimer::ExpireAfterTicksL(
    TTestResult& aResult, 
    CTestFlexTimer* /* aCallback */ )
    {
    __UHEAP_MARK;
    
    const TTimeIntervalMicroSeconds32 KInterval( 3000000 );     // Time to wait timer
    const TTimeIntervalMicroSeconds KWindow( 0 );               // Window for check results
    const TTimeIntervalMicroSeconds32 KOneTick( 1000000 / 64 ); // System tick: 1/64 sec

    // Initialize case
    aResult.SetResult( KErrGeneral, _L("Test case leaved") );

    TTime startTime;
    startTime.UniversalTime();
    TRequestStatus status;
    
    // Do the actual test
    //-----------------------------------------------------

    RFlexTimer timer;
    User::LeaveIfError( timer.Connect() );
    
    timer.AfterTicks( status, KInterval.Int() / KOneTick.Int() );
    
                                     //    //  ___     _____
    User::WaitForRequest( status ); // // // //_ // //  //
                                   //_//_// //  // //  //

    timer.Close();
    
    //-----------------------------------------------------

    // Verify the test
    TTime endTime;
    endTime.UniversalTime();

    aResult.SetResult( KErrNone, _L("Test case passed") );
    if ( !IsDelayOk( endTime.MicroSecondsFrom( startTime ), KInterval, KWindow ) )
        {
        aResult.SetResult( KErrGeneral, _L("Test case failed. Wrong expiration.") );
        }
    
    __UHEAP_MARKEND;

    return KErrNone;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:51,代码来源:testrflextimer.cpp


示例14: SetTimer

void CObexPacketTimer::SetTimer(TTimeIntervalMicroSeconds32 anInterval)
	{
	//Check if a timeout should be started on the request packet.
	if(anInterval.Int()>KLowestPossibleTimerValue)
		{
		Cancel();

		After(anInterval);
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:10,代码来源:obexpackettimer.cpp


示例15:

void CTestCase0676::ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps aStep)
	{
	LOG_VERBOSE2(_L("Wait %dms before drop VBus"), (TInt)(aMicroSecs.Int()/1000));
	if(gVerboseOutput)
	    {
	    OstTrace1(TRACE_VERBOSE, CTESTCASE0676_CONTINUEAFTER, "Wait %dms before drop VBus", (TInt)(aMicroSecs.Int()/1000));;
	    }
	iTimer.After(iStatus, aMicroSecs);
	iCaseStep = aStep;
	SetActive();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:11,代码来源:testcase0676.cpp


示例16: TestKeyboardRepeatRateL

void CTKRepeat::TestKeyboardRepeatRateL(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime)
{
    do
    {
#if defined(LOGGING)
        const TInt KOneSec=1000000;
        const TInt KOneHundrethSec=KOneSec/100;
        TLogMessageText logMessageText;
        _LIT(KRepeatRate,"Repeat Rate Initial=%d.%02dsecs, Subsequent=%d.%02dsecs");
        logMessageText.Format(KRepeatRate,aInitialTime.Int()/KOneSec,(aInitialTime.Int()%KOneSec)/KOneHundrethSec
                              ,aTime.Int()/KOneSec,(aTime.Int()%KOneSec)/KOneHundrethSec);
        LOG_MESSAGE(logMessageText);
#endif
        TheClient->iWs.SetKeyboardRepeatRate(aInitialTime, aTime);
        iWin->SetKeyboardRepeatRate(aInitialTime, aTime);
        CActiveScheduler::Start();
        if (iAbort)
        {
            iTest->AbortL();
        }
    } while(CheckReportL());
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:22,代码来源:TKRepeat.CPP


示例17: Start

EXPORT_C TInt CBusyTestUnit::Start(TTimeIntervalMicroSeconds32 aDelayFor, TTimeIntervalMicroSeconds aRunFor)
	{
	iRunFor = aRunFor;
	if (!aDelayFor.Int())
		{
		// run immediately
		return RunThread();
		}
	else
		{
		iTimer = CPeriodic::NewL(CActive::EPriorityHigh);
		TCallBack callback(StaticTimerCallback, this);
		iTimer->Start(aDelayFor, 0, callback);
		return KErrNone;
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:16,代码来源:TestStep.cpp


示例18: switch

void CRKWindow::WinKeyL(const TKeyEvent &aKey,const TTime &aTime)
	{
	if (aKey.iCode==EKeyEscape)
		{
		CActiveScheduler::Stop();
		iTest->iAbort=ETrue;
		}
	if (aKey.iCode==32)
		{
		switch(iState)
			{
			case EStateWaitingForKeyCode:
				SetState(EStateWaitingForFirstRepeat);
				iPrevTime=aTime;
				break;
			case EStateWaitingForFirstRepeat:
				iRepCount=1;
				iInitialGap = I64LOW(aTime.MicroSecondsFrom(iPrevTime).Int64());
				SetState(EStateWaitingForNthRepeat);
				break;
			case EStateWaitingForNthRepeat:
				if (iRepCount==5)
					SetState(EStateWaitingForKeyUp);
				else
					{
					TTimeIntervalMicroSeconds32 gap(I64LOW(aTime.MicroSecondsFrom(iPrevTime).Int64()));
					if (gap<iMinGap)
						iMinGap=gap;
					if (gap>iMaxGap)
						iMaxGap=gap;
					iTotalGap=iTotalGap.Int()+gap.Int();	// Horrible way to do a +=
					iRepCount++;
					SetState(EStateWaitingForNthRepeat);
					}
			case EStateWaitingForKeyUp: 	// Do nothing here
				break;
			default:
				iTest->TestL(EFalse);
			}
		iPrevTime=aTime;
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:42,代码来源:TKREPEAT.CPP


示例19: parse

void ScrShotsGenUtils::DumpJsFileL(CScrShotsSettings* scrShotsSettings)
{
    CGetImei* getImei = CGetImei::NewL();
    CleanupStack::PushL(getImei);
    RBuf8 formatBuf;
    formatBuf.Create(256);
    formatBuf.CleanupClosePushL();
    TFileName infoFile;
    
    User::LeaveIfError(CEikonEnv::Static()->FsSession().PrivatePath(infoFile));
    infoFile.Append( KDeviceJSFile );
    TParsePtrC parse((CEikonEnv::Static()->EikAppUi()->Application())->AppFullName());
    infoFile.Insert(0, KCDriveWithColon);
    
    RFs fsConn;
    User::LeaveIfError(fsConn.Connect());
    CleanupClosePushL(fsConn);
    RFile jsFile;
    if(BaflUtils::FileExists(fsConn, infoFile)){
        BaflUtils::DeleteFile(fsConn, infoFile);
    }
    //now create the file
    User::LeaveIfError(jsFile.Create(fsConn, infoFile, EFileWrite));
    CleanupClosePushL(jsFile);
    
//    User::LeaveIfError(jsFile.Write(KFunctionBlockStart));
    RBuf8 values;
    values.Create(256);
    for(int i = 0; i < KDeviceParamsCount ; i++){
        formatBuf.Zero();
        TInt sizeOfItem = User::StringLength((TText8 *)DeviceParams [i]);
        TPtr8 item((unsigned char*)DeviceParams [i],sizeOfItem ,sizeOfItem );
        switch(i){
            //device_model
            case 0:{
                CDeviceTypeInformation* devInfo = SysUtil::GetDeviceTypeInfoL();
                CleanupStack::PushL(devInfo);
                TPtrC manufName, modelCode, modelName;
                devInfo->GetManufacturerName(manufName);
                devInfo->GetModelCode(modelCode);
                devInfo->GetModelName(modelName);
                RBuf8 manufName8, modelName8, modelCode8;
                manufName8.Create(128); modelName8.Create(128); modelCode8.Create(128);
                manufName8.CleanupClosePushL(); modelName8.CleanupClosePushL(); modelCode8.CleanupClosePushL();
                manufName8.Copy(manufName);
                modelName8.Copy(modelName);
                modelCode8.Copy(modelCode);
                values.Format(KModelNameFormatString, &manufName8, &modelName8, &modelCode8);
                CleanupStack::PopAndDestroy(4);
                break;
            }
            //firmware_version
            case 1:{
                RBuf swVersion;
                swVersion.Create(128);
                SysUtil::GetSWVersion(swVersion);
                values.Copy(swVersion);
                TInt pos = 0;
                while((pos = values.Find(_L8("\n"))) != KErrNotFound){
                    //values.Delete(pos,1);
                    values.Replace(pos,1,_L8("_"));
                }
                swVersion.Close();
                break;
            }
            
            //ram_info
            case 2:{
                TInt totalram= 0;
                HAL::Get(HALData::EMemoryRAM, totalram);
                totalram /= 1024;
                values.Num(totalram);
                break;
            }
            
            //uptime
            case 3:{
                TTimeIntervalMicroSeconds32 iTickPeriod;
                UserHal::TickPeriod(iTickPeriod);
                TUint tickCount = User::TickCount();
                TUint noOfTicksPerSecond = (1000 * 1000) / iTickPeriod.Int();
                TInt noOfSecsSinceStartUp = tickCount / noOfTicksPerSecond;//noOfMicroSecsSinceStartup / (1000 * 1000);
                values.Num(noOfSecsSinceStartUp);
                break;
            }
            
            //scrshot count
            case 4:{
                values.Num(scrShotsSettings->TotalScrShotCount());
                break;
            }
            
            //symbian version
            case 5:{
                TVersion epocver = User::Version();
                values.Copy(epocver.Name());            
                break;
            }
            
            //series 60 version
//.........这里部分代码省略.........
开发者ID:eminemence,项目名称:pre-2013-prjs,代码行数:101,代码来源:ScrShotsGenUtils.cpp


示例20: KTimerOneInterval

// ---------------------------------------------------------------------------
// TEST CASE: Timer window works correctly
// ---------------------------------------------------------------------------
//
TInt CTestRFlexTimer::TestAfterTicksWindowL(
    TTestResult& aResult, 
    CTestFlexTimer* /* aCallback */ )
    {

    // T1: expiration after 4-8 sec
    const TTimeIntervalMicroSeconds32 KTimerOneInterval( 8000000 );
    const TTimeIntervalMicroSeconds32 KTimerOneWindow( 4000000 );

    // T2: expiration after 9-10 sec
    // T2's interval must not overlap with T1's -- otherwise T1 will be 
    // delayed
    const TTimeIntervalMicroSeconds32 KTimerTwoInterval( 10000000 );
    const TTimeIntervalMicroSeconds32 KTimerTwoWindow( 1000000 );

    // T3: expiration after 5 secs
    const TTimeIntervalMicroSeconds KAfterTimerInterval( 5000000 );
    const TTimeIntervalMicroSeconds KAfterTimerWindow( 0 );

    // System tick: 1/64 sec
    const TTimeIntervalMicroSeconds32 KOneTick( 1000000 / 64 );
    const TTimeIntervalMicroSeconds KNoWindow( 0 );

    
    
    // Initialize case
    aResult.SetResult( KErrGeneral, _L("Test case leaved") );

    TTime startTime;
    startTime.UniversalTime();
    TRequestStatus oneStatus, twoStatus, afterStatus;
    
    // Do the actual test
    //-----------------------------------------------------

    RFlexTimer timerOne;
    User::LeaveIfError( timerOne.Connect() );
    timerOne.Configure( KTimerOneWindow );
    timerOne.AfterTicks( oneStatus, KTimerOneInterval.Int() / KOneTick.Int() );

    RFlexTimer timerTwo;
    User::LeaveIfError( timerTwo.Connect() );
    timerTwo.Configure( KTimerTwoWindow );
    timerTwo.AfterTicks( twoStatus, KTimerTwoInterval.Int() / KOneTick.Int() );
    
    RFlexTimer afterTimer;
    User::LeaveIfError( afterTimer.Connect() );
    afterTimer.Configure( KAfterTimerWindow );
    afterTimer.After( afterStatus, KAfterTimerInterval );
    
                                        //    //  ___     _____
    User::WaitForRequest( oneStatus ); // // // //_ // //  //
                                      //_//_// //  // //  //

    TTime oneEndTime;
    oneEndTime.UniversalTime();
                                        //    //  ___     _____
    User::WaitForRequest( twoStatus ); // // // //_ // //  //
                                      //_//_// //  // //  //

    TTime twoEndTime;
    twoEndTime.UniversalTime();
    
    timerOne.Close();
    timerTwo.Close();
    afterTimer.Close();

    //-----------------------------------------------------
    
    // Handle afterStatus too - to get rid of unhandled asynchronous message
    // error from STIF.
    User::WaitForRequest( afterStatus );
    
    aResult.SetResult( KErrNone, _L("Test case passed") );
    
    // T1 should be expired at the same time than T3 - check with T3's values
    if ( !IsDelayOk( oneEndTime.MicroSecondsFrom( startTime ), KAfterTimerInterval, KNoWindow ) )
        {
        aResult.SetResult( KErrGeneral, _L("Test case failed. Timer one wrong expiration.") );
        }
    // T2 should be expired at it's max window
    else if ( !IsDelayOk( twoEndTime.MicroSecondsFrom( startTime ), KTimerTwoInterval, KNoWindow ) )
        {
        aResult.SetResult( KErrGeneral, _L("Test case failed. Timer two wrong expiration.") );
        }
    
    __UHEAP_MARKEND;

    return KErrNone;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:94,代码来源:testrflextimer.cpp



注:本文中的TTimeIntervalMicroSeconds32类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TTimeIntervalSeconds类代码示例发布时间:2022-05-31
下一篇:
C++ TTimeIntervalMicroSeconds类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap