26 #include "hrt_stopwatch.h"
37 sw->tstamps = malloc(
sizeof(
hrt_tstamp) * cap);
63 assert (sw->top < sw->cap);
64 int r = hrt_tnow(sw->tstamps + sw->top);
80 assert (0 <= y && y < sw->top);
81 assert (0 <= x && x < sw->top);
82 return hrt_rtmicros(&sw->tstamps[y].rtstamp, &sw->tstamps[x].rtstamp);
88 assert (0 <= y && y < sw->top);
89 assert (0 <= x && x < sw->top);
90 return hrt_ctmicros(&sw->tstamps[y].ctstamp, &sw->tstamps[x].ctstamp);