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

C++ After函数代码示例

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

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



在下文中一共展示了After函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
    }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:32,代码来源:vibratimer.cpp


示例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;
	}
}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:13,代码来源:ikev1sa.cpp


示例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 );
        }
    }
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:14,代码来源:sencoreshutdowntimer.cpp


示例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);
}
开发者ID:max3903,项目名称:SFLphone,代码行数:34,代码来源:symbian_ua_guiAppUi.cpp


示例5: After

void CTestTimer::QueueAndInfoPrint()
	{
	After(iSecondsRemaining*1000000);
	TBuf<100> message;
	message.Format(_L("%d seconds remaining"), iSecondsRemaining);
	User::InfoPrint(message);
	}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:7,代码来源:DEFOCUSING_EDWIN.CPP


示例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;
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:16,代码来源:ikev1keepalive.cpp


示例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();
         }
    }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:27,代码来源:egltest_stress_common_sgimage.cpp


示例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();
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:35,代码来源:egltest_stress_common_sgimage.cpp


示例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);
	}
}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:26,代码来源:ikev1sa.cpp


示例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);
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:25,代码来源:glxmedialiststestcollectionplugin.cpp


示例11: OstTraceFunctionEntryExt

void CSoftwareConnectTimer::SoftwareDisconnect(TInt aInterval)
	{
	OstTraceFunctionEntryExt( CSOFTWARECONNECTTIMER_SOFTWAREDISCONNECT_ENTRY, this );
	iConnectType = EDisconnect;
	After(aInterval*KOneSecond);
	OstTraceFunctionExit1( CSOFTWARECONNECTTIMER_SOFTWAREDISCONNECT_EXIT, this );
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:7,代码来源:SoftwareConnectTimer.cpp


示例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);

	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:26,代码来源:cachemgr.cpp


示例13: After

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


示例14: After

// -----------------------------------------------------------------------------
// CRadioServerShutdown::Start
// -----------------------------------------------------------------------------
//
void CRadioServerShutdown::Start()
    {
	if ( !IsActive() )
		{
		After(KServerShutdownDelay);
		}
    }
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:11,代码来源:RadioServerShutdown.cpp


示例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);	
				}
			}
		}
	}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:28,代码来源:cinifilemanager.cpp


示例16: Cancel

/**
Set rendering mode to synchronous or asynchronous
@param aMode Rendering mode to set.
*/
void CEglContent::SetMode(TMode aMode)
	{
	if(aMode == iMode)
		return;

	iMode = aMode;

	// reset mode
	if(aMode == ESync)
		{
		// cancel request for next frame
		Cancel();
		iFrame = 0;
		}
	else if(aMode == EAsync)
		{
		// render init frame
		iFrame = 0;
		RenderNextFrame();
		// issue request for next frame
		After(KEglContentDelay);
		}
	else // EAsyncDebug
		{
		// render init frame
		iFrame = 0;
		RenderNextFrame();
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:33,代码来源:tdirectgdieglcontent_server.cpp


示例17: ExecuteCallBack

// ---------------------------------------------------------------------------
// Notifies the Plug-in's client of stream's current sending status.
// ---------------------------------------------------------------------------
//
void CNATFWStunConnectionHandler::RunL()
    {
    ExecuteCallBack();
    if ( iCallBackCmds.Count() )
        {
        After( KWaitTime );
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:12,代码来源:natfwstunconnectionhandler_stub.cpp


示例18: After

/**
 * Retry a previously requested backup operation
 */
void CASSrvAlarmStore::RetryStoreOperation()
	{
	if (iFlags.IsSet(ERequestExternalize) && !IsActive())
		{
		// can RunL now
		After(0);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:11,代码来源:ASSrvAlarmStore.cpp


示例19: After

void CMMF_TSU_SWCDWRAP_MakeAsyncHwDeviceCall::CallStopAndDeleteCodecAfter(CMMFHwDevice& aHwDevice, TTimeIntervalMicroSeconds32 aTimeInterval)
	{
	iCallActionCancelled = EFalse;
	iHwDevice = &aHwDevice;
	iCallStopAndDeleteCodec = ETrue;
	iStopError = KErrNone;
	After(aTimeInterval);	
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:8,代码来源:TSU_MMF_SWCDWRAP_AsyncTimer.cpp


示例20: IRLOG_DEBUG

// ---------------------------------------------------------------------------
//CheckStatus of CacheDb and do cleanup if necessary
// ---------------------------------------------------------------------------
//
void CIRCacheCleanup::CheckStatusL()
    {
    IRLOG_DEBUG( "CIRCacheCleanup::CheckStatusL - Entering" );
    TTimeIntervalMicroSeconds32  interval(GetCleanupInterval());
    After(interval);
    CleanupCacheDbL();
    IRLOG_DEBUG( "CIRCacheCleanup::CheckStatusL - Exiting" );
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:12,代码来源:ircachecleanup.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ AfxBeginThread函数代码示例发布时间:2022-05-30
下一篇:
C++ Afe_Set_Reg函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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