1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Template-ize hsTimer return values.

This commit is contained in:
Darryl Pogue
2014-05-11 18:27:59 -07:00
parent 5b0652cb7e
commit a3ae4201a2
11 changed files with 91 additions and 94 deletions

View File

@ -153,7 +153,7 @@ void plDTProgressMgr::Draw( plPipeline *p )
if (fActivePlate)
{
float currentMs = hsTimer::FullTicksToMs(hsTimer::GetFullTickCount());
float currentMs = hsTimer::GetMilliSeconds<float>();
if ((currentMs - fLastDraw) > 30)
{
fCurrentImage++;

View File

@ -355,7 +355,7 @@ bool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
uint64_t startTotalTime = totalTime;
uint64_t startTime = 0;
if (fLogReadTimes)
startTime = hsTimer::GetFullTickCount();
startTime = hsTimer::GetTicks();
hsKeyedObject* ko = nil;
@ -449,7 +449,7 @@ bool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
if (fLogReadTimes)
{
uint64_t ourTime = hsTimer::GetFullTickCount() - startTime;
uint64_t ourTime = hsTimer::GetTicks() - startTime;
uint64_t childTime = totalTime - startTotalTime;
ourTime -= childTime;
@ -457,9 +457,9 @@ bool plResManager::IReadObject(plKeyImp* pKey, hsStream *stream)
pKey->GetUoid().GetObjectName().c_str(),
plFactory::GetNameOfClass(pKey->GetUoid().GetClassType()),
pKey->GetDataLen(),
hsTimer::FullTicksToMs(ourTime));
hsTimer::GetMilliSeconds<float>(ourTime));
totalTime += (hsTimer::GetFullTickCount() - startTime) - childTime;
totalTime += (hsTimer::GetTicks() - startTime) - childTime;
}
return (ko != nil);
@ -1132,7 +1132,7 @@ void plResManager::PageInRoom(const plLocation& page, uint16_t objClassToRef, pl
{
uint64_t readRoomTime = 0;
if (fLogReadTimes)
readRoomTime = hsTimer::GetFullTickCount();
readRoomTime = hsTimer::GetTicks();
plSynchEnabler ps(false); // disable dirty tracking while paging in
@ -1218,11 +1218,11 @@ void plResManager::PageInRoom(const plLocation& page, uint16_t objClassToRef, pl
if (fLogReadTimes)
{
readRoomTime = hsTimer::GetFullTickCount() - readRoomTime;
readRoomTime = hsTimer::GetTicks() - readRoomTime;
plStatusLog::AddLineS("readtimings.log", plStatusLog::kWhite, "----- Reading page %s>%s took %.1f ms",
pageNode->GetPageInfo().GetAge().c_str(), pageNode->GetPageInfo().GetPage().c_str(),
hsTimer::FullTicksToMs(readRoomTime));
hsTimer::GetMilliSeconds<float>(readRoomTime));
}
}

View File

@ -337,7 +337,7 @@ bool plAutoProfileImp::MsgReceive(plMessage* msg)
{
if (!ageLoaded->fLoaded)
{
fLinkTime = hsTimer::GetFullTickCount();
fLinkTime = hsTimer::GetTicks();
hsStatusMessage("Age unloaded");
}
return true;
@ -348,8 +348,8 @@ bool plAutoProfileImp::MsgReceive(plMessage* msg)
{
if (fNextAge > 0)
{
fLinkTime = hsTimer::GetFullTickCount() - fLinkTime;
float ms = hsTimer::FullTicksToMs(fLinkTime);
fLinkTime = hsTimer::GetTicks() - fLinkTime;
float ms = hsTimer::GetMilliSeconds<float>(fLinkTime);
hsStatusMessageF("Age %s finished load, took %.1f ms",
fAges[fNextAge-1].c_str(),