MCPcopy Create free account
hub / github.com/PhoneVR-Developers/PhoneVR / pvrInfo

Function pvrInfo

code/common/src/PVRGlobals.cpp:59–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void pvrInfo(string msg) {
60 SYSTEMTIME t;
61 GetLocalTime(&t);
62 ofstream of(std::wstring(_GetExePath() + logFileInfo).c_str(), ios_base::app);
63 auto ms = system_clock::now().time_since_epoch() / 1ms;
64 string elapsed = (ms - pvrInfo_oldMs < 1000 ? to_string(ms - pvrInfo_oldMs) : "max");
65 of << setfill('0') << setw(2) << t.wHour << ":" << setfill('0') << setw(2) << t.wMinute << ":"
66 << setfill('0') << setw(2) << t.wSecond << "(" << setfill('0') << setw(3) << t.wMilliseconds
67 << ") - " << setfill('0') << setw(2) << t.wDay << "." << setfill('0') << setw(2) << t.wMonth
68 << "." << setfill('0') << setw(4) << t.wYear << " -- " << setfill('0') << setw(2)
69 << t.wSecond << " " << setfill('0') << setw(3) << elapsed << " " << msg << endl;
70 pvrInfo_oldMs = ms;
71}
72#endif
73
74//////// only android //////

Callers

nothing calls this directly

Calls 2

_GetExePathFunction · 0.85
to_stringFunction · 0.85

Tested by

no test coverage detected