MCPcopy Create free account
hub / github.com/GPUOpen-Effects/GeometryFX / GetTimer

Method GetTimer

framework/d3d11/amd_sdk/src/Timer.cpp:539–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537}
538
539TimingEvent* TimingEvent::GetTimer( LPCWSTR timerId )
540{
541 size_t len = wcslen( timerId );
542 size_t seperator = wcscspn( timerId, L"/|\\" );
543
544 if (seperator < len)
545 {
546 LPWSTR idCopy = new WCHAR[len + 1];
547 wcscpy_s( idCopy, len + 1, timerId );
548 idCopy[seperator] = 0;
549
550 TimingEvent* te = m_firstChild;
551 while (te)
552 {
553 if (!wcscmp( idCopy, te->m_name ))
554 {
555 te = te->GetTimerRec( &idCopy[seperator + 1] );
556 delete [] idCopy;
557 return te;
558 }
559 te = te->m_next;
560 }
561
562 delete [] idCopy;
563 }
564 else
565 {
566 TimingEvent* te = m_firstChild;
567 while (te)
568 {
569 if (!wcscmp( timerId, te->m_name ))
570 {
571 return te;
572 }
573 te = te->m_next;
574 }
575 }
576 return NULL;
577}
578
579TimingEvent* TimingEvent::GetParent()
580{

Callers 3

StartMethod · 0.80
GetTimeMethod · 0.80
GetAvgTimeMethod · 0.80

Calls 1

GetTimerRecMethod · 0.80

Tested by

no test coverage detected