qpcpp/doxygen/snippets/qs_onGetTime.cpp
MMS 34cdcc7929 7.0.0rc1
major release 7.0.0 release candidate 1
2022-04-19 19:23:30 -04:00

13 lines
318 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