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


C++ CTimeValue::GetMilliSecondsAsInt64方法代码示例

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


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

示例1: ScriptTimer

//////////////////////////////////////////////////////////////////////////
// Create a new timer and put it in the list of managed timers.
int	CScriptTimerMgr::AddTimer( ScriptTimer &timer )
{
	CTimeValue nCurrTimeMillis = gEnv->pTimer->GetFrameStartTime();
	timer.nStartTime = nCurrTimeMillis.GetMilliSecondsAsInt64();
	timer.nEndTime = timer.nStartTime + timer.nMillis;
	if (!timer.nTimerID)
	{
		m_nLastTimerID++;
		timer.nTimerID = m_nLastTimerID;
	}
	else
	{
		if (timer.nTimerID > m_nLastTimerID)
			m_nLastTimerID = timer.nTimerID+1;
	}
	m_mapTempTimers[timer.nTimerID] = new ScriptTimer(timer);
	return timer.nTimerID;
}
开发者ID:aronarts,项目名称:FireNET,代码行数:20,代码来源:ScriptTimerMgr.cpp

示例2: AddEntityId

//------------------------------------------------------------------------
void CGameRulesHoldObjectiveBase::AddEntityId(int type, EntityId entityId, int index, bool isNewEntity, const CTimeValue &timeAdded)
{
	if(index >= HOLD_OBJECTIVE_MAX_ENTITIES)
	{
		CryFatalError("Too Many Hold Objective Entities Active!");
	}
	CryLog("CGameRulesHoldObjectiveBase::AddEntityId() received objective, eid=%i, index=%i, isNewEntity=%s, fTimeAdded=%lld, adding to pending queue", entityId, index, isNewEntity ? "true" : "false", timeAdded.GetMilliSecondsAsInt64());

	SHoldEntityDetails *pDetails = &m_entities[index];
	if (pDetails->m_id)
	{
		// We're overwriting another entity, disable the old one
		CleanUpEntity(pDetails);
	}
	// Can't actually activate the entity here since the entity may not be fully initialised yet (horrible ordering issue on game restart),
	// instead set it as pending and do the actual add in the ::Update(...) method
	pDetails->m_pendingId = entityId;
	pDetails->m_isNewEntity = isNewEntity;
	m_pendingTimeAdded = timeAdded;
}
开发者ID:aronarts,项目名称:FireNET,代码行数:21,代码来源:GameRulesHoldObjectiveBase.cpp

示例3: SaveToXML

static void SaveToXML(const XmlNodeRef& n, const char* name, const CTimeValue& t)
{
	n->setAttr(name, t.GetMilliSecondsAsInt64());
}
开发者ID:amrhead,项目名称:eaascode,代码行数:4,代码来源:GameStats.cpp


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