| 93 | } |
| 94 | |
| 95 | int ff_network_sleep_interruptible(int64_t timeout, AVIOInterruptCB *int_cb) |
| 96 | { |
| 97 | int64_t wait_start = av_gettime_relative(); |
| 98 | |
| 99 | while (1) { |
| 100 | int64_t time_left; |
| 101 | |
| 102 | if (ff_check_interrupt(int_cb)) |
| 103 | return AVERROR_EXIT; |
| 104 | |
| 105 | time_left = timeout - (av_gettime_relative() - wait_start); |
| 106 | if (time_left <= 0) |
| 107 | return AVERROR(ETIMEDOUT); |
| 108 | |
| 109 | av_usleep(FFMIN(time_left, POLLING_TIME * 1000)); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | void ff_network_close(void) |
| 114 | { |
no test coverage detected