MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / TimestampToLocalSystemTime

Method TimestampToLocalSystemTime

PresentData/PresentMonTraceSession.cpp:666–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666void PMTraceSession::TimestampToLocalSystemTime(uint64_t timestamp, SYSTEMTIME* st, uint64_t* ns) const
667{
668 if (mTimestampType != PMTraceSession::TIMESTAMP_TYPE_SYSTEM_TIME) {
669 auto delta100ns = (timestamp - mStartTimestamp.QuadPart) * 10000000ull / mTimestampFrequency.QuadPart;
670 timestamp = mStartFileTime + delta100ns;
671 }
672
673 FILETIME lft{};
674 FileTimeToLocalFileTime((FILETIME*) &timestamp, &lft);
675 FileTimeToSystemTime(&lft, st);
676 *ns = (timestamp % 10000000) * 100;
677}
678
679bool PMTraceSession::QueryEtwStatus(EtwStatus* status) const
680{

Callers 3

FrameMetrics>Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected