qpcpp/doxygen/snippets/qs_onGetTime.cpp
Quantum Leaps 890c8e7d8c 5.1.1
2013-10-10 20:01:51 -04:00

14 lines
319 B
C++

#ifdef Q_SPY
QSTimeCtr QS::onGetTime(void) { // invoked with interrupts disabled
QSTimeCtr ret = DPP::QS_tickTime_ - static_cast<QSTimeCtr>(SysTick->VAL);
if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) != 0U) { // flag set?
ret += DPP::QS_tickPeriod_;
}
return ret;
}
. . .
#endif // Q_SPY