mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 12:35:05 +02:00
Include total elapsed with HRT logs
This commit is contained in:
parent
ee0fe07a2c
commit
141dc47060
1 changed files with 8 additions and 1 deletions
|
@ -118,8 +118,15 @@ long long hrt_cmp_current(long long tstamp)
|
||||||
|
|
||||||
void hrt_log_delta(long long tstamp)
|
void hrt_log_delta(long long tstamp)
|
||||||
{
|
{
|
||||||
|
static long long initial = 1;
|
||||||
|
static long long initial_tstamp;
|
||||||
|
if (initial == 1) {
|
||||||
|
initial = 0;
|
||||||
|
initial_tstamp = hrt_get_current();
|
||||||
|
}
|
||||||
|
long long total = hrt_cmp_current(initial_tstamp);
|
||||||
long long delta = hrt_cmp_current(tstamp);
|
long long delta = hrt_cmp_current(tstamp);
|
||||||
fprintf(stdout, "[%llu]\n", delta);
|
fprintf(stdout, "%llu, %llu\n", total, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* END High resolution timers */
|
/* END High resolution timers */
|
||||||
|
|
Loading…
Add table
Reference in a new issue