#include "icq_timestamp.h" #include "system.h" #include "icq_queue.h" #include "icq_configuration.h" #include "icq_timing_execution_event_enum.h" #include "icq_timing_execution_trace.h" uint64_t icq_timestamp_timeTicksAtReset = 9999999999; uint64_t icq_timestamp_getTimestampValue() { uint64_t res = 0U; uint64_t microsecondTime = 0U; uint64_t timeTicks = 0U; // get the time tick maintained by the RTOS (time tick resolution = timer1ReloadRegister value) res = rtems_clock_get_uptime_nanoseconds()/1000; res = icq_timestamp_timeTicksAtReset - res; return res; } uint64_t icq_timestamp_getTimestampDelta(uint64_t startTime, uint64_t endTime){ uint64_t delta = 0U; if (startTime < endTime) { delta = endTime - startTime; } return delta; }