Skip to content
Myr

timing: finish: use time_stamp() when stop == NULL

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 d4d01e7 · Browse files · 1 file+1 added−4 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+1 added−4 removed

  • other:+1 added−4 removed

1 file+1 added−4 removed

modified:timing.c+1 added-4 removed
106 unmodified lines
107 if (start == NULL)108 return;109110 if (stop == NULL) {111 stop = malloc(sizeof(*stop));111 stop = time_stamp();112113 if (stop == NULL) {114 free(start);115 free(stop);115 return;116 }118119 clock_gettime(CLOCK_MONOTONIC, stop);117 }118119 struct timespec diff;120 timespec_sub(stop, start, &diff);
19 unmodified lines