Changeset 222 for trunk/apps/obexftp.c

Show
Ignore:
Timestamp:
08/06/08 19:40:02 (2 years ago)
Author:
zany
Message:

print timout stats if available

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/apps/obexftp.c

    r200 r222  
    2929 
    3030#include <sys/types.h> 
     31 
     32#ifdef HAVE_SYS_TIMES_H 
     33#include <sys/times.h> 
     34#endif 
    3135 
    3236#include <obexftp/obexftp.h> 
     
    246250{ 
    247251        int ret, retry; 
     252#ifdef HAVE_SYS_TIMES_H 
     253        clock_t clock; 
     254#endif 
    248255 
    249256        if (cli == NULL) { 
     
    266273 
    267274                /* Connect */ 
     275#ifdef HAVE_SYS_TIMES_H 
     276                clock = times(NULL); 
     277#endif 
    268278                ret = obexftp_connect_src(cli, src_dev, device, channel, uuid, uuid_len); 
     279#ifdef HAVE_SYS_TIMES_H 
     280                clock = times(NULL)-clock; 
     281                fprintf(stderr, "Tried to connect for %ldms\n", clock); 
     282#endif 
    269283                if (ret >= 0) 
    270284                        return TRUE;