It is experimental and not yet tested:
Code: Select all
#if CH_CFG_USE_TIMESTAMP == TRUE
systimestamp_t chVTGetTimeStampI(void);
void chVTResetTimeStampI(void);
#endif
Time stamps should be synchronized with system time and have the same resolution, the returned type is 64 bits wide. There are some constraints:
1) chVTGetTimeStampI() must be called at least once per system time "period" (before it wraps). This can be ensured by generating a stamp from within a VT callback or a thread or some interrupt source.
2) The counter is large but not infinite, applications should call chVTResetTimeStampI() in order to reset it if the uptime is meant to be large enough.
3) Not tested yet, there could be something wrong.
Giovanni