From 7fbe474a780fed1c73643dccb9b7be54d557479c Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 25 Oct 2005 14:04:48 +0000 Subject: [PATCH] using get_timestamp_millis() instead of manual time gathering git-svn-id: svn://svn.open-ils.org/ILS/trunk@1923 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- OpenSRF/src/srfsh/srfsh.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/OpenSRF/src/srfsh/srfsh.c b/OpenSRF/src/srfsh/srfsh.c index 9d003bbf1c..59dbb14972 100644 --- a/OpenSRF/src/srfsh/srfsh.c +++ b/OpenSRF/src/srfsh/srfsh.c @@ -608,7 +608,7 @@ int send_request( char* server, fprintf(less, "Request Completed Successfully\n"); - fprintf(less, "Request Time in seconds: %.3f\n", end - start ); + fprintf(less, "Request Time in seconds: %.6f\n", end - start ); fprintf(less, "------------------------------------\n"); pclose(less); @@ -789,20 +789,11 @@ int do_math( int count, int style ) { for(j=0; j != 4; j++) { ++running; - struct timeb t1; - struct timeb t2; - ftime(&t1); - //int req_id = osrf_app_session_make_request( session, params, methods[j], 1, NULL ); + double start = get_timestamp_millis(); int req_id = osrf_app_session_make_req( session, params, methods[j], 1, NULL ); - osrf_message* omsg = osrf_app_session_request_recv( session, req_id, 5 ); - - - ftime(&t2); - - double start = ( (int)t1.time + ( ((float)t1.millitm) / 1000 ) ); - double end = ( (int)t2.time + ( ((float)t2.millitm) / 1000 ) ); + double end = get_timestamp_millis(); times[(4*i) + j] = end - start; -- 2.43.2