本文整理汇总了C++中After函数的典型用法代码示例。如果您正苦于以下问题:C++ After函数的具体用法?C++ After怎么用?C++ After使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了After函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: __ASSERT_ALWAYS
// -----------------------------------------------------------------------------
// CVibraTimer::Set(TInt aIntervalInMilliSecs)
// Start the timer to complete after the specified number of microseconds.
// If the duration is zero, then timer is set to predefined maximum value.
// -----------------------------------------------------------------------------
//
TInt CVibraTimer::Set(TInt aIntervalInMilliSecs)
{
__ASSERT_ALWAYS(CActiveScheduler::Current()!= NULL, User::Invariant());
if (!IsAdded())
{
CActiveScheduler::Add(this);
}
// If the timer is already running, cancel it...
if (IsActive())
{
Cancel();
}
// And set the new timer...
// Convert to uS first -- which is, after all, why this method really exists...
if ((0 == aIntervalInMilliSecs) || (aIntervalInMilliSecs > iMaximumVibraTimeMs))
{
After(iMaximumVibraTimeMs * 1000);
}
else
{
After(aIntervalInMilliSecs * 1000);
}
return KErrNone;
}
示例2: After
void CIkev1SA::StartTimer()
{
if (iRemainingTime > KMaxTInt/SECOND) //To avoid overflowing the Timer
{
iRemainingTime -= KMaxTInt/SECOND;
After(KMaxTInt);
}
else //No overflow
{
After(iRemainingTime*SECOND);
iRemainingTime = 0;
}
}
示例3: After
void CSenCoreShutdownTimer::ActivateShutdown()
{
CActiveScheduler::Add(this);
if( iShutdownTimeInSecs > 0 )
{
TTimeIntervalMicroSeconds32 interval = iShutdownTimeInSecs * 1000 * 1000;
After( interval );
}
else // use 30 secs (default)
{
TTimeIntervalMicroSeconds32 interval = KSenDefaultShutdownTime * 1000 * 1000;
After( interval );
}
}
示例4: BaseConstructL
/**
* @brief Completes the second phase of Symbian object construction.
* Put initialization code that could leave here.
*/
void Csymbian_ua_guiAppUi::ConstructL()
{
// [[[ begin generated region: do not modify [Generated Contents]
BaseConstructL (EAknEnableSkin);
InitializeContainersL();
// ]]] end generated region [Generated Contents]
// Create private folder
RProcess process;
TFileName path;
path.Copy (process.FileName().Left (2));
if (path.Compare (_L ("c")) || path.Compare (_L ("C")))
CEikonEnv::Static()->FsSession().CreatePrivatePath (EDriveC);
else if (path.Compare (_L ("e")) || path.Compare (_L ("E")))
CEikonEnv::Static()->FsSession().CreatePrivatePath (EDriveE);
// Init PJSUA
if (symbian_ua_init() != 0) {
symbian_ua_destroy();
Exit();
}
ExecuteDlg_wait_initLD();
CTimer::ConstructL();
CActiveScheduler::Add (this);
After (4000000);
}
示例5: After
void CTestTimer::QueueAndInfoPrint()
{
After(iSecondsRemaining*1000000);
TBuf<100> message;
message.Format(_L("%d seconds remaining"), iSecondsRemaining);
User::InfoPrint(message);
}
示例6: After
void CIkeV1KeepAlive::StartTimer()
{
if ( iRemainingTime > KMaxTInt/1000000 ) //To avoid overflowing the Timer
{
iRemainingTime -= KMaxTInt/1000000;
After(KMaxTInt);
}
else //No overflow
{
if ( iRemainingTime )
{
After(iRemainingTime*1000000);
}
iRemainingTime = 0;
}
}
示例7: ReadFuncL
void CTReadWrite::ReadL()
{
ReadFuncL();
if(iFrameNumber != KNumberOfFrames)
{
iFrameNumber++;
for(TInt i=0; i<iBufferSize; i++)
{
if(iData[i] != iInitialColour)
{
RDebug::Print(_L("Unexpected pixel colour %x"), iData[i]);
CActiveScheduler::Stop();
iTestPass = EFalse;
return;
}
}
//Re-issue the request
After(TTimeIntervalMicroSeconds32(0));
}
else
{
//Stop the active scheduler and process with test termination
CActiveScheduler::Stop();
}
}
示例8: 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();
}
}
示例9: DEBUG_LOG
void CIkev1SA::SetExpired()
{
DEBUG_LOG(_L("CIkev1SA::SetExpired"));
if ( !iExpired ) //If already expired do nothing to avoid renewing the expiration timer.
{
DEBUG_LOG(_L("SA is still active. Expiring it..."));
iExpired = ETrue;
//if ( iHdr.iIkeData->iIpsecExpires )
//{
//DEB(iEngine->PrintText(_L("iIpsecExpires is ETrue\n"));)
for (TInt i = 0; i < iSPIList->Count(); i++)
{
DEBUG_LOG(_L("Deleting IPsec SA"));
TIpsecSPI* spi_node = iSPIList->At(i);
iPluginSession.DeleteIpsecSA( spi_node->iSPI,
spi_node->iSrcAddr,
spi_node->iDstAddr,
spi_node->iProtocol );
}
//}
Cancel(); //Cancel the current timer
After(ISAKMP_DELETE_TIME);
}
}
示例10: switch
void CGlxMediaListsTestCollectionPlugin::CTestTimer::RunL()
{
CMPXMedia* media = CMPXMedia::NewL();
CleanupStack::PushL(media);
media->SetTObjectValueL<TMPXGeneralCategory>(KMPXMediaGeneralCategory, EMPXImage);
switch (iNextEvent)
{
case EAddItem:
iPlugin->AddL(*media);
iNextEvent = ERemoveItem;
break;
case ERemoveItem:
iPlugin->RemoveL(*media);
iNextEvent = EAddItem;
break;
default:
break;
}
CleanupStack::PopAndDestroy(media);
After(2000000);
}
示例11: OstTraceFunctionEntryExt
void CSoftwareConnectTimer::SoftwareDisconnect(TInt aInterval)
{
OstTraceFunctionEntryExt( CSOFTWARECONNECTTIMER_SOFTWAREDISCONNECT_ENTRY, this );
iConnectType = EDisconnect;
After(aInterval*KOneSecond);
OstTraceFunctionExit1( CSOFTWARECONNECTTIMER_SOFTWAREDISCONNECT_EXIT, this );
}
示例12: interval32
void CRepositoryCacheManager::RescheduleTimer(const TTime& aTimeInUTC)
{
TTime now;
now.UniversalTime();
//Get the 64bit time interval between now and the cache timeout
TTimeIntervalMicroSeconds interval64 = aTimeInUTC.MicroSecondsFrom(now);
TTimeIntervalMicroSeconds32 interval32(iDefaultTimeout);
//If the interval is positive, i.e. the timeout is in the future, convert
//this interval to a 32 bit value, otherwise use the default timeout
if(interval64 > 0)
{
//If the interval value is less than the maximum 32 bit value cast
//interval to 32 bit value, otherwise the interval is too large for
//a 32 bit value so just set the interval to the max 32 bit value
const TInt64 KMax32BitValue(KMaxTInt32);
interval32 = (interval64 <= KMax32BitValue) ?
static_cast<TTimeIntervalMicroSeconds32>(interval64.Int64()): KMaxTInt32;
}
//Reschedule the timer
After(interval32);
}
示例13: After
// --------------------------------------------------------------------------
// CUPnPBrowseTimer::Start
// Starts the periodizer.
// --------------------------------------------------------------------------
//
void CUPnPBrowseTimer::Start()
{
if ( !IsActive() )
{
After( TTimeIntervalMicroSeconds32( iTimerWavelength ) );
}
}
示例14: After
// -----------------------------------------------------------------------------
// CRadioServerShutdown::Start
// -----------------------------------------------------------------------------
//
void CRadioServerShutdown::Start()
{
if ( !IsActive() )
{
After(KServerShutdownDelay);
}
}
示例15: After
void CIniFileManager::ScheduleSaveIniFileSettings(TInt aSaveFlags, TBool aReplace)
{
// make sure all requested writes are saved
iSaveType |= aSaveFlags;
iReplace = aReplace;
// make sure change isn't due to Internalize
if (iBackupFlag != EIsRestoring)
{
iBackupFlag = ERequestSave;
//iNumberOfAttemptedRetries = 0;
// set the time to RunL if not already set to run
// check that no Backup or Restore is in progress,
// For Backup And Restore
if (!(iDbMgrCtrlr.BackupRestoreAgent().BackupInProgress()) &&
!(iDbMgrCtrlr.BackupRestoreAgent().RestoreInProgress()))
{
if (!IsActive())
{
#ifdef INIFILE_DEBUG_LOG
RDebug::Print(_L("\n[CNTMODEL] CIniFileManager::ScheduleSaveIniFileSettings(aSaveFlags = %i, aReplace %i)\r\n"),aSaveFlags, aReplace);
#endif
After(KIniFileSaveDelay);
}
}
}
}