summaryrefslogtreecommitdiff
path: root/source3/include/profile.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-06 23:01:47 +0000
committerJeremy Allison <jra@samba.org>2000-10-06 23:01:47 +0000
commit74d4a3b7410547d9f65bfc26de5f22c623574afd (patch)
tree1ce41ec5a9c410060b486e2ad1c0b251bb11e422 /source3/include/profile.h
parent9c6acf4595d14cb0fc0c9bf17ce02de73af127cd (diff)
downloadsamba-74d4a3b7410547d9f65bfc26de5f22c623574afd.tar.gz
samba-74d4a3b7410547d9f65bfc26de5f22c623574afd.tar.bz2
samba-74d4a3b7410547d9f65bfc26de5f22c623574afd.zip
Added Herb's fixes to HEAD.
Jeremy. (This used to be commit 4862d2ab1163310d844b929fb17239b4f4cb1a99)
Diffstat (limited to 'source3/include/profile.h')
-rw-r--r--source3/include/profile.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/include/profile.h b/source3/include/profile.h
index d18f598021..c196a63c62 100644
--- a/source3/include/profile.h
+++ b/source3/include/profile.h
@@ -319,6 +319,7 @@ extern struct profile_struct *profile_p;
extern struct timeval profile_starttime;
extern struct timeval profile_endtime;
extern BOOL do_profile_flag;
+extern BOOL do_profile_times;
/* these are helper macros - do not call them directly in the code
* use the DO_PROFILE_* START_PROFILE and END_PROFILE ones
@@ -349,17 +350,19 @@ extern BOOL do_profile_flag;
}
#define START_PROFILE(x) \
if (do_profile_flag) { \
- GetTimeOfDay(&profile_starttime); \
+ if (do_profile_times) \
+ GetTimeOfDay(&profile_starttime); \
INC_PROFILE_COUNT(x##_count); \
}
#define START_PROFILE_BYTES(x,n) \
if (do_profile_flag) { \
- GetTimeOfDay(&profile_starttime); \
+ if (do_profile_times) \
+ GetTimeOfDay(&profile_starttime); \
INC_PROFILE_COUNT(x##_count); \
ADD_PROFILE_COUNT(x##_bytes,n); \
}
#define END_PROFILE(x) \
- if (do_profile_flag) { \
+ if (do_profile_times) { \
GetTimeOfDay(&profile_endtime); \
ADD_PROFILE_COUNT(x##_time,PROFILE_TIME); \
}