当前位置: 首页>>代码示例>>C++>>正文


C++ TTimeIntervalMicroSeconds32::Int方法代码示例

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


在下文中一共展示了TTimeIntervalMicroSeconds32::Int方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: StartWatcherL

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: Configure

// ---------------------------------------------------------------------------
// 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

示例4: Start

// ---------------------------------------------------------------------------
// 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: ExpireAfterTicksL

// ---------------------------------------------------------------------------
// 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

示例10: 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

示例11: 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

示例12: 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

示例13:

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

示例14: CheckResults

TBool CRKWindow::CheckResults()
	{
//
// Checks repeat results, first convert everything to 10th's as that what is actually used 
// for the timer in the window server.
//
// Return ETrue if the inacuracy in the average time is greater than 1/10th either way
// Allow initial 2/10ths either
// Allow min 2/10ths below
// Allow max 2/10ths above
//
	if (iState!=EStateInactive)
		return(ETrue);
	TInt initial=iInitialGap.Int()/100000;
	TInt initialX=iInitialRepeatSet.Int()/100000;
	if (initialX==0)
		initialX=1;
	TInt average=(iTotalGap.Int()/100000)/(iRepCount-1);
	TInt repeatX=iRepeatSet.Int()/100000;
	if (repeatX==0)
		repeatX=1;
	TInt min=iMinGap.Int()/100000;
	TInt max=iMaxGap.Int()/100000;
	if (average>(repeatX+1) || average<(repeatX-1))
		return(ETrue);
	if (initial>(initialX+2) || initial<(initialX-2))
		return(ETrue);
	if (min>(repeatX+1) || min<(repeatX-2))
		return(ETrue);
	if (max>(repeatX+3) || max<repeatX)
		return(ETrue);
	return(EFalse);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:33,代码来源:TKREPEAT.CPP

示例15: 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


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