qpcpp/doxygen/snippets/qs_onGetTime.cpp

14 lines
319 B
C++
Raw Normal View History

2012-08-14 18:00:48 -04:00
#ifdef Q_SPY
2013-10-10 20:01:51 -04:00
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;
2012-08-14 18:00:48 -04:00
}
. . .
#endif // Q_SPY