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


C++ TTimeIntervalMicroSeconds函数代码示例

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


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

示例1: DoTestStepL

/**
 *
 * Do the test step.
 * Each test step must supply an implementation for DoTestStepL.
 *
 * @return	"TVerdict"
 *			The result of the test step
 *
 * @xxxx
 * 
 */
TVerdict CTestStepToneSetVolumeRamp::DoTestStepL()
	{
	iTestStepResult = EPass;
	TInt ramp = 0;
	
	for (ramp=0; ramp<=1000000; ramp+=1000)
		{
		iTone->SetVolumeRamp(TTimeIntervalMicroSeconds(ramp));
		// no way to check directly since its a SoundDev property which is on the server side
		// out of scope to check the SoundDev
		//if (static_cast<CMMFMdaAudioToneUtility*>(iTone)->iDevSound->iRampDuration != TTimeIntervalMicroSeconds(ramp) )
		//	{
		//	iTestStepResult = EFail;
		//	}

		//checked manualy the CMMFSoundDev and Set seems to work OK
		}
	
	// Try also with prepared Tone utility
	iTone->PrepareToPlayTone(400,TTimeIntervalMicroSeconds(500000));
	CActiveScheduler::Start();
	if ( iError != KErrNone ||
		 iTone->State() != EMdaAudioToneUtilityPrepared	)
		return EInconclusive;

	for (ramp=0; ramp<=1000000; ramp+=1000)
		{
		iTone->SetVolumeRamp(TTimeIntervalMicroSeconds(ramp));
		//checked manualy the CMMFSoundDev and Set seems to work OK
		}
	
	INFO_PRINTF1(_L("finished with this test step"));
	// test steps return a result
	return iTestStepResult;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:46,代码来源:TestStepToneSetVolumeRamp.cpp

示例2: TTimeIntervalMicroSeconds

// helper function: calculates time between frames
void CMMFRawFormatRead::CalculateFrameTimeInterval()
	{
	if ((iFrameSize) && (iSampleRate) && (iBitsPerSample) && (iChannels))
		{
		iFrameTimeInterval = TTimeIntervalMicroSeconds((iFrameSize*KOneSecondInMicroSeconds)/iSampleRate);
		iFrameTimeInterval = 
			TTimeIntervalMicroSeconds(iFrameTimeInterval.Int64()/(iBitsPerSample*iChannels));
		iFrameTimeInterval = TTimeIntervalMicroSeconds(iFrameTimeInterval.Int64()*8);
		}
	}
开发者ID:huellif,项目名称:symbian-example,代码行数:11,代码来源:mmfrawformat.cpp

示例3: __ASSERT_ALWAYS

void CMMFTestVideoDecodeHwDevice::SetPosition(const TTimeIntervalMicroSeconds& aPlaybackPosition)
	{
	if (aPlaybackPosition == TTimeIntervalMicroSeconds(KTestPositionFatal))
		{
		iProxy->MdvppFatalError(this, KErrDied);
		}
	else
		{
		__ASSERT_ALWAYS(aPlaybackPosition == TTimeIntervalMicroSeconds(KTestPosition), DevVideoDecoderPanic(EDecoderPanicSetPosition));
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:11,代码来源:decoder.cpp

示例4: DP_DTMF_WRITE

// ---------------------------------------------------------------------------
// CDTMFPayloadFormatWrite::FrameTimeInterval
// Gets audio frame size in milliseconds.
// ---------------------------------------------------------------------------
//
TTimeIntervalMicroSeconds CDTMFPayloadFormatWrite::FrameTimeInterval( 
    TMediaId aMediaType ) const
    {
    DP_DTMF_WRITE( _L("CDTMFPayloadFormatWrite::FrameTimeInterval") );
    
    if ( KUidMediaTypeAudio == aMediaType.iMediaType )
        {
        return TTimeIntervalMicroSeconds( TInt64( 0 ) );
        }
    else
        {
        return TTimeIntervalMicroSeconds( TInt64( 0 ) );
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:19,代码来源:dtmfpayloadformatwrite.cpp

示例5: clipLength

// returns the duration of the source clip
TTimeIntervalMicroSeconds CMMFRawFormatRead::Duration(TMediaId aMediaId) const
	{
	if ((aMediaId.iMediaType == KUidMediaTypeAudio) && 
		(iClipLength) && (iSampleRate) && (iBitsPerSample) && (iChannels))
		{//we have enough values to calculate the duration
		TInt64 clipLength(iClipLength);
		clipLength*=KOneSecondInMicroSeconds;
		TTimeIntervalMicroSeconds duration = TTimeIntervalMicroSeconds(clipLength/iSampleRate);
		duration = TTimeIntervalMicroSeconds(duration.Int64()/(iBitsPerSample*iChannels));
		duration = TTimeIntervalMicroSeconds(duration.Int64()*8);
		return duration;
		}
	else return TTimeIntervalMicroSeconds(0);
	}
开发者ID:huellif,项目名称:symbian-example,代码行数:15,代码来源:mmfrawformat.cpp

示例6: TTimeIntervalMicroSeconds

// -----------------------------------------------------------------------------
// CAdvancedAudioRecordController::PositionL
// -----------------------------------------------------------------------------
//
EXPORT_C TTimeIntervalMicroSeconds CAdvancedAudioRecordController::PositionL() const
    {
#ifdef _DEBUG
	RDebug::Print(_L("CAdvancedAudioRecordController::PositionL"));
#endif
    if ( iState == ERecording )
        {
        return TTimeIntervalMicroSeconds(iTimePositionInMicroSecs + iAudioInput->CalculateAudioInputPositionL());
        }
    else
        {
        return TTimeIntervalMicroSeconds(iTimePositionInMicroSecs);
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:18,代码来源:AdvancedAudioRecordController.cpp

示例7: TTimeIntervalMicroSeconds

// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
void CAlfExAnalogDialerFeedback::Start( TInt    aDurationMilliSeconds,
                                        TInt    aIntervalMilliSeconds)
    {
    iDuration = KFeedbackDefault;
    iInterval = KFeedbackMinimumInterval;

    // 1000: convert millis to micros
    if (iFeedback)
        {
        iFeedback->InstantFeedback(ETouchFeedbackBasic);
        }
    if ( aIntervalMilliSeconds > KFeedbackMinimumInterval )
        {
        iInterval = 1000*aIntervalMilliSeconds;   
        }
    if (aDurationMilliSeconds >= KFeedbackMinimumDuration)
        {    
        iDuration = 1000*aDurationMilliSeconds;   
        iDurationStop.HomeTime();
        iDurationStop +=  TTimeIntervalMicroSeconds(TInt64(iDuration));
        iClock->Cancel();
        iClock->Start(  iInterval,
                        iInterval, 
                        TCallBack( HandleInterval, this ));
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:30,代码来源:alfexanalogdialerfeedback.cpp

示例8:

/** Verify CMMFPtrBuffer status checking
 * Use case: N/A
 * @test Req. under test PREQ 10
 */
TVerdict CTestStep_MMF_BASECL_U_0157::DoTestStepL( void )
	 {
	 TVerdict verdict = EPass;
	 const TInt KMMFTestTime = 1234567890;
	 CMMFPtrBuffer* ptrBuffer = CMMFPtrBuffer::NewL(); //create descriptor buffer

	 //check that the initial time to play is 0
	 if (ptrBuffer->TimeToPlay() != TTimeIntervalMicroSeconds(0)) verdict = EFail;

	 //assign a timestamp and check it is set correctly
	 ptrBuffer->SetTimeToPlay(TTimeIntervalMicroSeconds(KMMFTestTime));
	 if (ptrBuffer->TimeToPlay() != TTimeIntervalMicroSeconds(KMMFTestTime)) verdict = EFail;
 
	 delete ptrBuffer;
	 return verdict;
	 }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:20,代码来源:TSU_MMF_BASECL_Buffers.cpp

示例9: SetupPsyL

// ---------------------------------------------------------
// CT_LbsClientPosTp194::StartL
//
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsClientPosTp194::StartL()
    {
    
	SetupPsyL(iUidMultiPsy);

	TInt numberOfRuns = 100;
	TTimeIntervalMicroSeconds interval5 = TTimeIntervalMicroSeconds(4000000);
	TUid uid = iUidMultiPsy;
	
	CT_LbsClientPeriodicTester* periodicTester1 = CT_LbsClientPeriodicTester::NewL(interval5, KServiceName1, iLog, uid, numberOfRuns);
	CleanupStack::PushL(periodicTester1);

	CT_LbsClientPeriodicTester* periodicTester2 = CT_LbsClientPeriodicTester::NewL(interval5, KServiceName2, iLog, uid, numberOfRuns);
	CleanupStack::PushL(periodicTester2);

	periodicTester1->RequestNotification();
	periodicTester2->RequestNotification();
	
	// Active scheduler is stopped two times.
	CActiveScheduler::Start();
	CActiveScheduler::Start();

    //check for errors
    TBool test1 = periodicTester1 -> IsCompletedOK(); 
    TBool test2 = periodicTester2 -> IsCompletedOK();

    CleanupStack::PopAndDestroy(2,periodicTester1);
    
    if (!test1 || !test2)
        {
        _LIT(KError, "Test did not complete with no error, check log file");
        LogErrorAndLeaveL(KError);
        }

	}
开发者ID:fedor4ever,项目名称:default,代码行数:41,代码来源:ctlbsclientpostp194.cpp

示例10: PackPositionData

void CPositionRequest::CompleteRequest(TInt aReason)
    {
    // Return fix to the client
    if (aReason == KErrNone || aReason == KPositionPartialUpdate)
        {
        TInt err = PackPositionData();
        // err - client cannot receive result data
        CompleteClient((err != KErrNone) ? err : aReason);

        // Save current fix to LastKnownPosition handler
        // partial updates are not stored
        if ( aReason == KErrNone )
            {
            SaveAsLastKnownPosition();
            }
        }
    else
        {
        CompleteClient(aReason);
        }
    
    // If the request is not tracking mode, deactivate the indicator
    // Tracking mode check and the last check for the error scenarios other than
    // KErrNone and KPositionPartialUpdate.
    if( ( ( iTrackingState == EPosFirstTrackingRequest || iTrackingState == EPosTracking ) &&
    	     iTrackingUpdateInterval >  KIndFlickerTresholdTracking ) ||
          iTrackingUpdateInterval == TTimeIntervalMicroSeconds ( 0 ) ||
          !( aReason == KErrNone || aReason == KPositionPartialUpdate ) )
        {
        DeActivatePositioningStatusIfNeeded();
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:32,代码来源:EPos_CPositionRequest.cpp

示例11: TTimeIntervalMicroSeconds

// ---------------------------------------------------------------------------
// TEST CASE: Start timer with After (64 bit) without connecting first
// ---------------------------------------------------------------------------
//
TInt CTestRFlexTimer::After64WithoutConnect(
    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, TTimeIntervalMicroSeconds( 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,代码行数:37,代码来源:testrflextimer.cpp

示例12: SetAbsoluteTimeout

void SetAbsoluteTimeout(RTimer& aTimer, TUint aUs, TRequestStatus& aStatus)
	{
	TTime wakeup;
	wakeup.HomeTime();
	wakeup += TTimeIntervalMicroSeconds(aUs);
	aTimer.At(aStatus, wakeup);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:7,代码来源:t_power.cpp

示例13: TTimeIntervalMicroSeconds

/**
 * Implementation of the MMdaAudioPlayerCallback interface functions
 **/
void CTestStepPlayerAllocFailOpenFile::MapcInitComplete(TInt aErrorcCode, 
														const TTimeIntervalMicroSeconds &/*aDuration*/)
	{
#ifdef __WINS__
	iKErrGeneralIgnored = EFalse;
	if ( aErrorcCode == KErrGeneral )
		iKErrGeneralIgnored = ETrue; //Ignore KErrGeneral on EMULATOR
#endif

	if ( aErrorcCode == KErrNone || aErrorcCode == KErrNoMemory )
		{
		iAllocOK = ETrue;

		if ( aErrorcCode == KErrNone 
					&& iPlayer->Duration() > TTimeIntervalMicroSeconds(0) )
			{
			iResultOK = ETrue;
			}
		}
	else 
		{
		INFO_PRINTF2(_L("Unexpected error %d seen"), aErrorcCode);
		iAllocOK = EFalse;
		}

	CActiveScheduler::Stop();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:30,代码来源:TestStepPlayerAllocFailOpenFile.cpp

示例14: _LIT

void CPosition::ConstructL()
{
    User::LeaveIfError(iServer.Connect());
    User::LeaveIfError(iPositioner.Open(iServer));

    _LIT(KRequestor, "OpenMAR" );
    User::LeaveIfError(iPositioner.SetRequestor(CRequestor::ERequestorService, CRequestor::EFormatApplication, KRequestor));

    const TInt KSecond = 1000000;
    TPositionUpdateOptions updateOptions;
    updateOptions.SetUpdateInterval(TTimeIntervalMicroSeconds(10 * KSecond));
    updateOptions.SetUpdateTimeOut(TTimeIntervalMicroSeconds(30 * KSecond));
    updateOptions.SetMaxUpdateAge(TTimeIntervalMicroSeconds(1 * KSecond));
    updateOptions.SetAcceptPartialUpdates(EFalse);

    User::LeaveIfError(iPositioner.SetUpdateOptions(updateOptions));
}
开发者ID:DavidCaabeiro,项目名称:openmar,代码行数:17,代码来源:Position.cpp

示例15: FrameTimeIntervalCalculation

EXPORT_C TTimeIntervalMicroSeconds FrameTimeIntervalCalculation(
	TUint aFrameSize,
	TUint aAvgBytesPerSecond)
	{
	return(TTimeIntervalMicroSeconds(
		TInt64(aFrameSize) * TInt64(KOneSecondInMicroSeconds) /
		TInt64(aAvgBytesPerSecond)));	

	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:9,代码来源:formatUtils.cpp


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