There is no way of doing that currently, but you could add something like the following to timers.c [read caveats below]:
portTickType xTimerGetExpireTime( xTimerHandle xTimer )
xTIMER *pxTimer = ( xTIMER * ) xTimer;
portTickType xTimeNow, xExpireTime, xReturn;
const portTickType xMaxTime = -1;
configASSERT( pxTimer );
xTimeNow = xTaskGetTickCount();
xExpireTime = listGET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ) );
if( xExpireTime >= xTimeNow )
xReturn = xExpireTime - xTimeNow;
xReturn = ( xMaxTime - xTimeNow ) + xExpireTime;
1) This code is completely untested, not even compiled, it is here for demonstration of how it could be done only.
2) You have to take into account that time may pass between calling this function and the function returning - especially if it is called from a low priority task.
Hope that helps.
Yes Richard. That surely helps. I pictured something like that, including the suspends, but wasn't sure how to get at the expiration time. I'll try to work with this. But for safety sake may end up with the brute force approach with an array of timers waiting for the last one to expire.
Thanks for your help.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.