Skip to content

Commit

Permalink
[win32] fix build - GetCurrentThreadUsage() has gone away
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marshall committed May 2, 2012
1 parent 32cebcb commit a121bc6
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions xbmc/threads/platform/win/ThreadImpl.cpp
Expand Up @@ -190,18 +190,3 @@ float CThread::GetRelativeUsage()

return m_fLastUsage;
}

int64_t CThread::GetCurrentThreadUsage()
{
HANDLE h = GetCurrentThread();

uint64_t time = 0;
FILETIME CreationTime, ExitTime, UserTime, KernelTime;
if( GetThreadTimes(h, &CreationTime, &ExitTime, &KernelTime, &UserTime ) )
{
time = (((uint64_t)UserTime.dwHighDateTime) << 32) + ((uint64_t)UserTime.dwLowDateTime);
time += (((uint64_t)KernelTime.dwHighDateTime) << 32) + ((uint64_t)KernelTime.dwLowDateTime);
}
return time;
}

0 comments on commit a121bc6

Please sign in to comment.