13
0

Use GLib::usleep for portability

This commit is contained in:
Tim Mayberry 2013-07-19 18:46:52 +10:00
parent c0e65452b1
commit d975d84437

View File

@ -197,7 +197,7 @@ http_get_thread (void *arg) {
char *res = NULL; char *res = NULL;
do { do {
res=curl_http_get(url, &status); res=curl_http_get(url, &status);
if (status == 503) usleep(5000); // try-again if (status == 503) Glib::usleep(5000); // try-again
} while (status == 503 && --timeout > 0); } while (status == 503 && --timeout > 0);
if (status != 200 || !res) { if (status != 200 || !res) {
@ -246,7 +246,7 @@ VideoImageFrame::http_download_done (char *data){
exposeimg(); exposeimg();
/* don't request frames too quickly, wait after user has zoomed */ /* don't request frames too quickly, wait after user has zoomed */
usleep(40000); Glib::usleep(40000);
if (queued_request) { if (queued_request) {
http_get_again(want_video_frame_number); http_get_again(want_video_frame_number);