| 64 | } |
| 65 | |
| 66 | double TimerBase::ElapsedTimeAsDouble() |
| 67 | { |
| 68 | if (m_stuckAtZero) |
| 69 | return 0; |
| 70 | |
| 71 | if (m_started) |
| 72 | { |
| 73 | TimerWord now = GetCurrentTimerValue(); |
| 74 | if (m_last < now) // protect against OS bugs where time goes backwards |
| 75 | m_last = now; |
| 76 | return ConvertTo(m_last - m_start, m_timerUnit); |
| 77 | } |
| 78 | |
| 79 | StartTimer(); |
| 80 | return 0; |
| 81 | } |
| 82 | |
| 83 | unsigned long TimerBase::ElapsedTime() |
| 84 | { |
no outgoing calls
no test coverage detected