MCPcopy Create free account
hub / github.com/LibreVR/Revive / ovr_GetTimeInSeconds

Function ovr_GetTimeInSeconds

Revive/REV_CAPI.cpp:1101–1111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1099}
1100
1101OVR_PUBLIC_FUNCTION(double) ovr_GetTimeInSeconds()
1102{
1103 REV_TRACE(ovr_GetTimeInSeconds);
1104
1105 float freq = vr::VRSystem()->GetFloatTrackedDeviceProperty(vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_DisplayFrequency_Float);
1106 float elapsed = 1.0f / freq - vr::VRCompositor()->GetFrameTimeRemaining();
1107
1108 uint32_t predictionID = 0;
1109 vr::VRCompositor()->GetLastPosePredictionIDs(&predictionID, nullptr);
1110 return (double)predictionID / freq + elapsed;
1111}
1112
1113OVR_PUBLIC_FUNCTION(ovrBool) ovr_GetBool(ovrSession session, const char* propertyName, ovrBool defaultVal)
1114{

Callers 1

GetInputStateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected