I have a relatively long running clock instance (3min timeout, single shot). is there a way to query the elapsed time within the timeout or how much time i left?
Thanks.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
You can do the following:
#include <ti/sysbios/knl/package/internal/Clock.xdc.h> Clock_Handle handle = Clock_handle(&ptrToClockStruct); uint32_t currTicks = Clock_getTicks(); uint32_t ticksUntilNextTrigger = handle->currTimeout - currTicks; uint32_t secondsUntilNextTrigger = Clock_tickPeriod * ticksUntilNextTrigger / 1000000; uint32_t secondsUntilNextTick = Seconds_Get() + secondsUntilNextTrigger;