Skip to content
Myr

timing: time values have different sizes on 32- and 64-bit

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 89e8fbc · Browse files · 1 file+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:timing.c+6 added-2 removed
62 unmodified lines
63 xvsnprintf(msg, len + 1, fmt, va2);64 va_end(va2);656667 LOG_WARN("%s: %lds %ldµs since boot-up", msg, diff.tv_sec, diff.tv_nsec / 1000);67 LOG_WARN("%s: %llds %lldµs since boot-up", msg,68 (unsigned long long)diff.tv_sec,69 (unsigned long long)diff.tv_nsec / 1000);70}7172static struct timespec *73time_stamp(void)
58 unmodified lines
132 char msg[len + 1];133 xvsnprintf(msg, len + 1, fmt, va2);134 va_end(va2);135134 LOG_WARN("%s in %lds %ldµs", msg, diff.tv_sec, diff.tv_nsec / 1000);136 LOG_WARN("%s in %llds %lldµs", msg,137 (unsigned long long)diff.tv_sec,138 (unsigned long long)diff.tv_nsec / 1000);139140 free(start);141 free(stop);142}