| 132 | } |
| 133 | |
| 134 | STDMETHODIMP CBaseReferenceClock::GetTime(__out REFERENCE_TIME *pTime) |
| 135 | { |
| 136 | HRESULT hr; |
| 137 | if (pTime) |
| 138 | { |
| 139 | REFERENCE_TIME rtNow; |
| 140 | Lock(); |
| 141 | rtNow = GetPrivateTime(); |
| 142 | if (rtNow > m_rtLastGotTime) |
| 143 | { |
| 144 | m_rtLastGotTime = rtNow; |
| 145 | hr = S_OK; |
| 146 | } |
| 147 | else |
| 148 | { |
| 149 | hr = S_FALSE; |
| 150 | } |
| 151 | *pTime = m_rtLastGotTime; |
| 152 | Unlock(); |
| 153 | MSR_INTEGER(m_idGetSystemTime, LONG((*pTime) / (UNITS / MILLISECONDS))); |
| 154 | |
| 155 | #ifdef DXMPERF |
| 156 | PERFLOG_GETTIME((IReferenceClock *)this, *pTime); |
| 157 | #endif // DXMPERF |
| 158 | } |
| 159 | else |
| 160 | hr = E_POINTER; |
| 161 | |
| 162 | return hr; |
| 163 | } |
| 164 | |
| 165 | /* Ask for an async notification that a time has elapsed */ |
| 166 |
no outgoing calls
no test coverage detected