summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-22 03:20:38 +0000
committerChris Lattner <sabre@nondot.org>2005-03-22 03:20:38 +0000
commitfed1b27d323001682e7cb1bd66bb5d603cabb9f8 (patch)
tree59c7261005d1e64fd0fe37d15f9bcd708d8d8ccb /lib/Support
parenta513fb127f579b43cd954d028e4bf0581dd65907 (diff)
Timers SHOULD NOT record the time taken to count the bytes allocated in the heap!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Timer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp
index 382825a2a4e..be58238f8b0 100644
--- a/lib/Support/Timer.cpp
+++ b/lib/Support/Timer.cpp
@@ -112,11 +112,11 @@ static TimeRecord getTimeRecord(bool Start) {
ssize_t MemUsed = 0;
if (Start) {
- sys::Process::GetTimeUsage(now,user,sys);
MemUsed = getMemUsage();
+ sys::Process::GetTimeUsage(now,user,sys);
} else {
- MemUsed = getMemUsage();
sys::Process::GetTimeUsage(now,user,sys);
+ MemUsed = getMemUsage();
}
Result.Elapsed = now.seconds() + now.microseconds() / 1000000.0;