Revision: 1187
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1187&view=rev
Author: sbalea
Date: 2007-10-10 08:13:04 -0700 (Wed, 10 Oct 2007)
Log Message:
-----------
Merge change from trunk: do not depend on internal APIs in sample clients
Modified Paths:
--------------
branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c
Modified: branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c
===================================================================
--- branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c 2007-10-10 15:10:47 UTC (rev 1186)
+++ branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c 2007-10-10 15:13:04 UTC (rev 1187)
@@ -223,6 +223,11 @@
return 0;
}
+long msecdiff(struct timeval *t0, struct timeval *t1)
+{
+ return (t1->tv_sec - t0->tv_sec) * 1000L + (t1->tv_usec - t0->tv_usec) / 1000L;
+}
+
int main(int argc, char **argv)
{
int i;
@@ -329,7 +334,7 @@
while ( !call_established )
{
gettimeofday(&now, NULL);
- if ( timeout > 0 && iaxci_msecdiff(&now, &start_time) > timeout )
+ if ( timeout > 0 && msecdiff(&start_time, &now) > timeout )
hangup_and_exit(TEST_NO_CONNECTION);
iaxc_millisleep(5);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|