diff options
author | Herb Lewis <herb@samba.org> | 2000-10-10 21:22:56 +0000 |
---|---|---|
committer | Herb Lewis <herb@samba.org> | 2000-10-10 21:22:56 +0000 |
commit | b17eadb2220c0fc85cea57466887c3ff9c6481ab (patch) | |
tree | d3ff970d86dd3294bea33f2004b01766a01c618b | |
parent | 6e1cfc2204667f95bd9a478723b0291e07b33102 (diff) | |
download | samba-b17eadb2220c0fc85cea57466887c3ff9c6481ab.tar.gz samba-b17eadb2220c0fc85cea57466887c3ff9c6481ab.tar.xz samba-b17eadb2220c0fc85cea57466887c3ff9c6481ab.zip |
profile times saved in microseconds instead of milliseconds. Some times
never incremented if it took less that a millisecond.
-rw-r--r-- | source/include/profile.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/include/profile.h b/source/include/profile.h index 35c9e05402e..aeecb74f4b7 100644 --- a/source/include/profile.h +++ b/source/include/profile.h @@ -37,7 +37,7 @@ enum flush_reason_enum { SEEK_FLUSH, READ_FLUSH, WRITE_FLUSH, READRAW_FLUSH, #define PROF_SHM_MAGIC 0x6349985 #define PROF_SHM_VERSION 3 -/* time values in the following structure are in milliseconds */ +/* time values in the following structure are in microseconds */ struct profile_stats { /* general counters */ @@ -332,7 +332,9 @@ extern BOOL do_profile_times; #define INC_PROFILE_COUNT(x) profile_p->x++ #define DEC_PROFILE_COUNT(x) profile_p->x-- #define ADD_PROFILE_COUNT(x,y) profile_p->x += (y) -#define PROFILE_TIME TvalDiff(&profile_starttime,&profile_endtime) +#define PROFILE_TIME \ + ((profile_endtime.tv_sec - profile_starttime.tv_sec) *1000000 + \ + ((int)profile_endtime.tv_usec - (int)profile_starttime.tv_usec)) #ifdef WITH_PROFILE #define DO_PROFILE_INC(x) \ |