MCPcopy Create free account
hub / github.com/axboe/liburing / within_range

Function within_range

test/min-timeout.c:55–62  ·  view source on GitHub ↗

* Allow 25% tolerance */

Source from the content-addressed store, hash-verified

53 * Allow 25% tolerance
54 */
55static int within_range(unsigned int target, unsigned int msec)
56{
57 unsigned int high, low;
58
59 low = (target * 3) / 4;
60 high = (target * 5) / 4;
61 return (msec >= low && msec <= high);
62}
63
64static int test(int flags, int expected_ctx, int min_wait, int write_delay,
65 int nr_cqes, int msec_target)

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected