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


C++ TTimeIntervalMicroSeconds32函数代码示例

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


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

示例1: if

void CTContentUpdateReceiver::DoSetInternalPriorityL()
	{
	RThread thread;
	User::LeaveIfError(thread.Open(iReceiverThreadId));
	thread.SetPriority(iInternalPriority);
	thread.Close();
	TInt compositionInterval = KCompositionInterval;
	CPeriodic::TPriority priority = CPeriodic::EPriorityStandard;
	if(iInternalPriority < EPriorityNormal)
		{
		priority = CPeriodic::EPriorityIdle;
		compositionInterval = KCompositionIntervalLong;
		}
	else if (iInternalPriority > EPriorityNormal)
		{
		priority = CPeriodic::EPriorityHigh;
		compositionInterval = KCompositionIntervalShort;
		}

	TCallBack callback(CallBack);
	callback.iPtr = this;
	iPeriodic->Cancel();
	delete iPeriodic;
	iPeriodic= CPeriodic::NewL(priority);
	iPeriodic->Start(TTimeIntervalMicroSeconds32(compositionInterval),TTimeIntervalMicroSeconds32(compositionInterval), callback);
	iSetInternalPriority = EFalse;
	iPriorityLock.Signal();
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:28,代码来源:tcompositionbackend.cpp

示例2: DP_DTMF_WRITE

// ---------------------------------------------------------------------------
// CDTMFPayloadFormatWrite::HandleControlChar
// Takes care of handling 'p' and 'w' chars in a DTMF string.
// ---------------------------------------------------------------------------
//
void CDTMFPayloadFormatWrite::HandleControlChar( const TChar& aChar )
    {
    if ( 'p' == aChar )
        {
        // 'p' char is interpreted as a 2.5 second pause
        DP_DTMF_WRITE( _L("CDTMFPayloadFormatWrite::HandleControlChar - PAUSE DETECTED") );
        iSendTimer->Cancel();
        iStateMachine->ChangeStateTo( EStateSendPaused );
        TCallBack callBack( HandleTimerEventL, this );
        iSendTimer->Start( 
            TTimeIntervalMicroSeconds32( KDTMFPauseLengthInUs ),
            TTimeIntervalMicroSeconds32( KDTMFPauseLengthInUs ), 
            callBack );
        }
    else if ( 'w' == aChar )
        {
        // Stop in a DTMF string
        DP_DTMF_WRITE( _L("CDTMFPayloadFormatWrite::HandleControlChar - STOP DETECTED ") );

        if ( iNotifyStopReq )
            {
            iSendTimer->Cancel();
            iStateMachine->ChangeStateTo( EStateSendStopped );

            SendEventSignalToClient( KMccDtmfStopInDtmfString );
            }
        }
    else
        {
        // not a control character
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:37,代码来源:dtmfpayloadformatwrite.cpp

示例3: TTimeIntervalMicroSeconds32

void CBatteryInfoObserver::ConstructL()
	{
    iPeriodic = CPeriodic::NewL( EPriorityNormal );
    // Start the timer with 2 minute interval
    iPeriodic->Start( TTimeIntervalMicroSeconds32(KHalfSecond),
        TTimeIntervalMicroSeconds32(KTwoMins),
        TCallBack(CBatteryInfoObserver::RunTimer,
        this ));
	}	
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:9,代码来源:BatteryInfoObserver.cpp

示例4: callback

void CTContentUpdateReceiver::ConstructL()
	{
	TCallBack callback(CallBack);
	callback.iPtr = this;
	User::LeaveIfError(iLock.CreateLocal());
	User::LeaveIfError(iPriorityLock.CreateLocal(0));
    iPeriodic= CPeriodic::NewL(CPeriodic::EPriorityStandard);
    iPeriodic->Start(TTimeIntervalMicroSeconds32(0),TTimeIntervalMicroSeconds32(KCompositionInterval), callback);
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:9,代码来源:tcompositionbackend.cpp

示例5: DP_DTMF_WRITE2

// ---------------------------------------------------------------------------
// CDTMFPayloadFormatWrite::DoToneOffActionsL
// Called by sendtimer. Does actions belonging to tone off state and exits
// state when exit conditions are met. Actions include: sending final packets.
// ---------------------------------------------------------------------------
//
void CDTMFPayloadFormatWrite::DoToneOffActionsL( TBool aEntryToState )
    {
    DP_DTMF_WRITE2( _L("CDTMFPayloadFormatWrite::DoToneOffActionsL, tick = %u"), 
        User::NTickCount() );

    #ifdef VOIP_TRACE_ENABLED
        VoipTrace( "%x %x", MCC_TRACE, MCC_DTMF_PLF_WRITE_SENDFINALPKT );
    #endif
    
    if ( aEntryToState )
        {
        iSendTimer->Cancel();
        iFinalPacketCtr = 0;
        
        TCallBack callBack( HandleTimerEventL, this );
        iSendTimer->Start(
            TTimeIntervalMicroSeconds32( iCInfo.iPtime * KFactor1000 ),
            TTimeIntervalMicroSeconds32( iCInfo.iPtime * KFactor1000 ),
            callBack );
        }
    else
        {
        iFinalPacketCtr++;
        if ( KNumOfFinalPackets >= iFinalPacketCtr )
            {
            DeliverPacketL( *iSinkBuffer, EFalse );
            }
        else
            {
            TUint curOffDur = iFinalPacketCtr * iCInfo.iPtime * KFactor1000;
            if ( EModeManual == iSendingMode || 
                 KDTMFDefToneOffLengthInUs <= curOffDur )
                {
                // Prevent audio sending during final packet retransmission by
                // sending completion event only when also retransmissions are
                // done.
                if ( EModeManual == iSendingMode )
                    {
                    SendEventSignalToClient( KMccDtmfManualStop );
                    }
                else
                    {
                    SendEventSignalToClient( KMccDtmfSequenceStop );
                    }
                
                iSendTimer->Cancel();
                iFinalPacketCtr = 0;
                if ( iSendBuffer.Count() > 0 )
                	{
                	iSendBuffer.Remove( 0 );	
                	}
                iStateMachine->ChangeStateTo( EStateEncodeNextDigit );
                }
            }
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:62,代码来源:dtmfpayloadformatwrite.cpp

示例6: SetKeyboardRepeatRate

void CRKWindow::SetKeyboardRepeatRate(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime)
	{
	iInitialRepeatSet=aInitialTime;
	iRepeatSet=aTime;
	iMinGap=TTimeIntervalMicroSeconds32(100000000);	// Any very big number will do
	iMaxGap=TTimeIntervalMicroSeconds32(0);
	iTotalGap=TTimeIntervalMicroSeconds32(0);
	SetState(EStateWaitingForKeyDown);
	Client()->iWs.Flush();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:10,代码来源:TKREPEAT.CPP

示例7: cb

void CAnimationDlg::PostLayoutDynInitL()
	{
	CAnimateFramesCtl* animationCtl = static_cast<CAnimateFramesCtl*>(Control(EBmpAnimationCtlId));
	animationCtl->StartAnimationL();


	TCallBack cb(Execute,this);
	iTimer = CPeriodic::NewL(EPriorityLow);
	iTimer->Start(TTimeIntervalMicroSeconds32(7000000), TTimeIntervalMicroSeconds32(1), cb);
		
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:11,代码来源:TBMPAnimStep.cpp

示例8: new

/**
This text case will verify that vertical text drawing of XCoeTextDrawer class is correct and 
consistent with horizontal drawing of the same alignment. Clip area will also be set to check that 
drawing will not happen outside this area. The text will consist of a few lines.

defect INC122592  
Visual verification is required.
*/
TBool CCone7TestAppUi::TestTextDrawer_5L()
	{
	CCtlTestTextDrawer* testTextDrawer = new(ELeave) CCtlTestTextDrawer();
	CleanupStack::PushL(testTextDrawer);
	testTextDrawer->ConstructL();
	testTextDrawer->SetExtent(TPoint(20,20),TSize(600,200));
	testTextDrawer->ActivateL();
	testTextDrawer->DrawNow();
	
	const TInt noOfLines = TCoeTextTypeAdaptor(KMultipleLineText1).NumberOfLines();

	TOpenFontFaceAttrib openFontFaceAttrib;
	((CFbsFont&)(testTextDrawer->FontUsed())).GetFaceAttrib(openFontFaceAttrib);
	TBuf<25> buf(openFontFaceAttrib.FullName());
	INFO_PRINTF2(_L("CCtlTestTextDrawer : Typeface being used is %S"), &buf);
	
	//testing with clip area
	TRect clipRect = testTextDrawer->Rect();
	clipRect.Shrink(40, 40);
	TRgb nonClippedText = KRgbRed;
	
	//drawing vertical text, up direction
	for(TInt testIndex = 0; testIndex <= 8; testIndex++)
		{
		testTextDrawer->TestTextDrawer(testIndex, ETrue, NULL, &nonClippedText);
		testTextDrawer->TestTextDrawer(testIndex, ETrue, &clipRect, NULL, EFalse);
		User::After( TTimeIntervalMicroSeconds32(1000000) );

		testTextDrawer->TestTextDrawer(testIndex, EFalse, NULL, &nonClippedText);
		testTextDrawer->TestTextDrawer(testIndex, EFalse, &clipRect, NULL, EFalse);
		User::After( TTimeIntervalMicroSeconds32(1000000) );
		}

	//drawing vertical text, up direction
	for(TInt testIndex = 0; testIndex <= 8; testIndex++)
		{
		testTextDrawer->TestTextDrawer(testIndex, ETrue, NULL, &nonClippedText);
		testTextDrawer->TestTextDrawer(testIndex, ETrue, &clipRect, NULL, EFalse);
		User::After( TTimeIntervalMicroSeconds32(1000000) );

		testTextDrawer->TestTextDrawer(testIndex, EFalse, NULL,     &nonClippedText, ETrue, EFalse);
		testTextDrawer->TestTextDrawer(testIndex, EFalse, &clipRect, NULL,         EFalse, EFalse);
		User::After( TTimeIntervalMicroSeconds32(1000000) );
		}
	
	CleanupStack::PopAndDestroy(testTextDrawer);		
	return ETrue;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:56,代码来源:TCONE7STEP.CPP

示例9: _LIT

/**
 *
 * Do the test step.
 * Each test step must supply an implementation for DoTestStepL.
 *
 * @return	"TVerdict"
 *			The result of the test step
 *
 * @xxxx
 * 
 */
TVerdict CTestStepToneSetDTMFLengths::DoTestStepL()
	{
	iTestStepResult = EPass;
	TInt err = KErrNone;

	_LIT(KDTMFStr1, "AB,C, "); 
	//_LIT(KDTMFStr2, "125774 6788* #A *d GHET"); //HIJKLMNOPQRSTUVWXYZ");
	//_LIT(KDTMFStrInvalid, "123   <>?$%&$%^&");

	// test1 //
	for (TInt dur = 1; dur<3000000; dur*=2)
		{
		// create the Tone utility
		TRAP( err, (iTone = CMMFMdaAudioToneUtility::NewL(*this)) );
		if ( err != KErrNone )
			return EInconclusive;

		iTone->SetDTMFLengths( TTimeIntervalMicroSeconds32(dur), 
							   TTimeIntervalMicroSeconds32(dur),
							   TTimeIntervalMicroSeconds32(dur) );
		//if (iTone->State() != EMdaAudioToneUtilityPrepared)
		//	{
		//	return EFail;
		//	}
		TRAP(err, iTone->PrepareToPlayDTMFString( KDTMFStr1 ) );
		CActiveScheduler::Start();
		if (err != KErrNone ||
			iError != KErrNone ||
			iTone->State() != EMdaAudioToneUtilityPrepared	)
			return EInconclusive;

		// play just for confirmation
		//iTone->Play();
		//CActiveScheduler::Start();
		//User::After(2000000); //6*dur);
		//if (iError != KErrNone)
		//	iTestStepResult = EInconclusive;
		delete iTone;
		iTone = NULL;
		}

	//iTestStepResult = EFail;
	//INFO_PRINTF1(_L("!*****FAILED ON PURPOSE, problem with corrupt CMdaAudioToneUtility object after playing"));

	INFO_PRINTF1(_L("finished with this test step"));
	// test steps return a result
	return iTestStepResult;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:59,代码来源:TestStepToneSetDTMFLengths.cpp

示例10: After

// --------------------------------------------------------------------------
// CUPnPBrowseTimer::Start
// Starts the periodizer.
// --------------------------------------------------------------------------
//
void CUPnPBrowseTimer::Start()
    {
    if ( !IsActive() )
        {
        After( TTimeIntervalMicroSeconds32( iTimerWavelength ) );
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:12,代码来源:upnpbrowsetimer.cpp

示例11: CleanupClosePushL

/**
@SYMTestCaseID		GRAPHICS-WSERV-GCE-0700

@SYMDEF  			DEF123129

@SYMTestCaseDesc    Test activating a sprite twice does not cause the system to hang

@SYMTestPriority    High

@SYMTestStatus      Implemented

@SYMTestActions     Construct a sprite and add a member to it. Activate twice.

@SYMTestExpectedResults The test should terminate smoothly and it should not hang the system.
*/
void CTTSprite::DoubleActivateL()
	{
	RWsSession ws;
	User::LeaveIfError(ws.Connect());
	CleanupClosePushL(ws);
	
	RWindowGroup group(ws);
	User::LeaveIfError(group.Construct(890, EFalse));
	CleanupClosePushL(group);
	
	RWsSprite sprite = RWsSprite(ws);
	User::LeaveIfError(sprite.Construct(group,TPoint(),0));
	CleanupClosePushL(sprite);
	CFbsBitmap* bitmap=new(ELeave) CFbsBitmap;
	CleanupStack::PushL(bitmap);
	User::LeaveIfError(bitmap->Create(TSize(10,12),EColor256));
	TSpriteMember member;
	member.iMaskBitmap=NULL;
	member.iInvertMask=EFalse;
	member.iDrawMode=CGraphicsContext::EDrawModePEN;
	member.iOffset=TPoint();
	member.iInterval=TTimeIntervalMicroSeconds32(0);
	member.iBitmap=bitmap;
	User::LeaveIfError(sprite.AppendMember(member));
	User::LeaveIfError(sprite.Activate());
	User::LeaveIfError(sprite.Activate());
	
	sprite.Close();
	CleanupStack::PopAndDestroy(4, &ws);
	
	group.Close();
	ws.Close();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:48,代码来源:TSPRITE.CPP

示例12: CTBlankWindow

void CTTSprite::ResizeMemberL()
	{
#ifndef __WINS__
	CTBlankWindow* win=new(ELeave) CTBlankWindow();
	CleanupStack::PushL(win);
	win->ConstructL(*TheClient->iGroup);
	win->SetExt(TPoint(),TSize(640,240));
	RWindowBase& window=*win->BaseWin();
	window.Activate();
	RWsSprite sprite(TheClient->iWs);
	CleanupClosePushL(sprite);
	User::LeaveIfError(sprite.Construct(window,TPoint(),0));
	TSpriteMember member;
	member.iMaskBitmap=NULL;
	member.iInvertMask=EFalse;
	member.iDrawMode=CGraphicsContext::EDrawModePEN;
	member.iOffset=TPoint();
	member.iInterval=TTimeIntervalMicroSeconds32(250000);
	member.iBitmap=&iBitmap;
	User::LeaveIfError(sprite.AppendMember(member));
	User::LeaveIfError(sprite.AppendMember(member));
	User::LeaveIfError(sprite.Activate());
	User::After(1000000); // // Interval is 1 sec.
	User::LeaveIfError(iBitmap.Resize(iBitmap.SizeInPixels() + TSize(100,100)));
	User::After(1000000);  // Interval is 1 sec.
	CleanupStack::PopAndDestroy(&sprite);
	CleanupStack::PopAndDestroy(win);
#endif // __WINS__
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:29,代码来源:TSPRITE.CPP

示例13: LBSLOG

/**
 * @return - TVerdict code
 * Override of base class virtual
 */
TVerdict CEtel1Step::doTestStepPreambleL()
	{
	LBSLOG(ELogP1,"CEtel1Step::doTestStepPreambleL - Start");
	
	RLbsSystemController lbsSysController;
	lbsSysController.OpenL(KLbsSuplTestUid);
	//Start the LBS sub-system if it is not running
	if(lbsSysController.RequestSystemStartup()!= ELbsStartupSuccess)
		{
		lbsSysController.Close();
		User::Leave(KErrNotReady); 
		}
	
	//We do not need Lbs to be running - not to interfere with our tests
	User::LeaveIfError(lbsSysController.RequestCompleteCloseDown());	
	
	lbsSysController.Close();
	
	// Call base class method for pre test actions	
	CTe_suplprotocolSuiteStepBase::doTestStepPreambleL();
	 
	TLbsNetProtocolModuleParams param(*iGatewayObserver);
	iModule = CSuplGatewayInterface::NewL(reinterpret_cast<TAny*>(&param));	
	
	iSchedulerWait = new(ELeave) CActiveSchedulerWait;
	iTimer = CLbsCallbackTimer::NewL(*this);
	
	//Start active scheduler for a while to complete the async initialization calls
	iTimer->EventAfter(TTimeIntervalMicroSeconds32(KInitializationTimeout), 0);
	iSchedulerWait->Start();
	 
	LBSLOG(ELogP1,"CEtel1Step::doTestStepPreambleL - End");
	return TestStepResult();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:38,代码来源:etel1Step.cpp

示例14: ReadImageFuncL

void CTReadWrite::ReadWriteImageL()
    {
    ReadImageFuncL();

    TBool ret = EFalse; 
    for(TInt i=0; i<iBufferSize; i++)
        {
        if(iData[i] == iInitialColour)
            {
            iData[i] = iFinalColour;
            WriteImageFuncL();

            //Re-issue the request
            After(TTimeIntervalMicroSeconds32(0));
            
            ret = ETrue;
            break;
            }
        else if(iData[i] != iFinalColour)
            {
            CActiveScheduler::Stop();
            iTestPass = EFalse;
            
            ret = ETrue;
            break;
            }
        }

    //If no pixels have been modified, check to see if the test should finish
    if( (IsFinished() != EFalse) && (ret == EFalse) )
        {
        //Stop the active scheduler and process with test termination
        CActiveScheduler::Stop();
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:35,代码来源:egltest_stress_common_sgimage.cpp

示例15: TTimeIntervalMicroSeconds32

// ---------------------------------------------------------------------------
// TEST CASE: Start timer with After (32 bit) without connecting first
// ---------------------------------------------------------------------------
//
TInt CTestRFlexTimer::After32WithoutConnect(
    TTestResult& aResult, 
    CTestFlexTimer* aCallback )
    {
    TRequestStatus status;

    // Test should panic with
    // Category: "KERN-EXEC"
    // Reason:   0
    aCallback->TestModuleIf().SetExitReason( 
        CTestModuleIf::EPanic,
        0 );
    
    // Do the actual test
    //-----------------------------------------------------

    RFlexTimer timer;
    timer.After( status, TTimeIntervalMicroSeconds32( 1000000 ) );
    User::WaitForRequest( status ); // PANIC
    timer.Close();
    
    //-----------------------------------------------------

    // No panic, change result back to normal
    aCallback->TestModuleIf().SetExitReason( 
        CTestModuleIf::ENormal,
        KErrNone );

    aResult.SetResult( KErrGeneral, _L("Test case failed. No panic.") );

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


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