| 45 | } |
| 46 | |
| 47 | static bool |
| 48 | parse_uint (const char *arg, unsigned int *value) |
| 49 | { |
| 50 | char *end = NULL; |
| 51 | unsigned long parsed = strtoul (arg, &end, 10); |
| 52 | |
| 53 | if (!arg[0] || !end || *end || parsed > UINT_MAX) |
| 54 | return false; |
| 55 | |
| 56 | *value = (unsigned int) parsed; |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | static double |
| 61 | ns_to_ms (uint64_t ns) |