* Return number of microseconds since starting the stopwatch. */
| 168 | * Return number of microseconds since starting the stopwatch. |
| 169 | */ |
| 170 | static inline int64_t stopwatch_duration_usecs(struct stopwatch *sw) |
| 171 | { |
| 172 | /* |
| 173 | * If the stopwatch hasn't been ticked (current == start) tick |
| 174 | * the stopwatch to gather the accumulated time. |
| 175 | */ |
| 176 | if (!mono_time_cmp(&sw->start, &sw->current)) |
| 177 | stopwatch_tick(sw); |
| 178 | |
| 179 | return mono_time_diff_microseconds(&sw->start, &sw->current); |
| 180 | } |
| 181 | |
| 182 | static inline int64_t stopwatch_duration_msecs(struct stopwatch *sw) |
| 183 | { |
no test coverage detected