On 2/8/21 12:51 PM, Andrii Nakryiko wrote:
start = sched_clock();
+ if (unlikely(!start))
+ start = NO_START_TIME;
+ }
return start;
Oh, and actually, given you have `start > NO_START_TIME` condition in
exit function, you don't need this `if (unlikely(!start))` bit at all,
because you are going to ignore both 0 and 1. So maybe no need for a
new function, but no need for extra if as well.
This unlikely(!start) is needed for very unlikely case when
sched_clock() returns 0. In such case the prog should still be executed.