diff options
author | Joshua Judson Rosen | 2015-02-16 23:33:02 -0500 |
---|---|---|
committer | Joshua Judson Rosen | 2015-02-16 23:33:02 -0500 |
commit | b3be641eeddce360692d3a3e872d769f86f1b293 (patch) | |
tree | dcb07ecbb9a04ff7e7cbe5adfeb246de87e354d6 /src/http_proxy_functions.c | |
parent | VC: ignore backup-files. (diff) | |
download | apf-b3be641eeddce360692d3a3e872d769f86f1b293.tar.gz |
Nix mysleep().
Just use sleep() where only whole-second resolution is used
to delay between reconnect-attempts; and nanosleep where
sub-second resolution is used.
sleep() should actually be OK, because we don't intermix those calls
with alarm() or any other signals or itimer functions.
nanosleep() should be OK because POSIX.1-2001 requires
that it not have the crazy signal interactions
that its predecessors are known for.
Diffstat (limited to 'src/http_proxy_functions.c')
-rw-r--r-- | src/http_proxy_functions.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/http_proxy_functions.c b/src/http_proxy_functions.c index e7bef6f..3e53365 100644 --- a/src/http_proxy_functions.c +++ b/src/http_proxy_functions.c @@ -51,21 +51,6 @@ myrand(int down, int up) } /* - * Function name: mysleep - * Description: Sleeps for the given amount of milliseconds. - * Arguments: time - the amount of milliseconds to sleep for - */ - -void -mysleep(double time) -{ - struct timeval tv; - tv.tv_sec = (int) time; - tv.tv_usec = (int)(time * 1000000)%1000000; - select(0, NULL, NULL, NULL, &tv); -} - -/* * Function name: delete_user * Description: Deletes the user's connection from the http proxy connections. * Arguments: cnts - the connection to remove |