change low res sleep func api names

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11486 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-01-25 21:23:07 +00:00
parent 1973ee74bc
commit 0463541d61
49 changed files with 180 additions and 180 deletions

View File

@@ -105,7 +105,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
max = (int) strlen(set);
srand((unsigned int) switch_timestamp_now());
srand((unsigned int) switch_micro_time_now());
for (x = 0; x < len; x++) {
int j = (int) (max * 1.0 * rand() / (RAND_MAX + 1.0));
@@ -510,7 +510,7 @@ SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
}
switch_socket_sendto(sock, remote_addr, 0, (void *) packet, &bytes);
started = switch_timestamp_now();
started = switch_micro_time_now();
*ip = NULL;
*port = 0;
@@ -522,7 +522,7 @@ SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
break;
}
if ((elapsed = (unsigned int) ((switch_timestamp_now() - started) / 1000)) > 5000) {
if ((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > 5000) {
*err = "Timeout";
switch_socket_shutdown(sock, SWITCH_SHUTDOWN_READWRITE);
switch_socket_close(sock);