aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/Timer.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-23 18:12:30 +0000
committerOwen Anderson <resistor@mac.com>2009-06-23 18:12:30 +0000
commitcd92c1000eeceb195daaab47ca4a2161ab2da410 (patch)
treea6434844d9b262973f53709f5bdbc7e2aef8aef6 /include/llvm/Support/Timer.h
parentd9bc6a92f55c274b2c1367c7b4c0b721d121bd10 (diff)
Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Timer.h')
-rw-r--r--include/llvm/Support/Timer.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h
index 584199f440..9e19a1c432 100644
--- a/include/llvm/Support/Timer.h
+++ b/include/llvm/Support/Timer.h
@@ -34,12 +34,12 @@ class TimerGroup;
/// if they are never started.
///
class Timer {
- double Elapsed; // Wall clock time elapsed in seconds
- double UserTime; // User time elapsed
- double SystemTime; // System time elapsed
- ssize_t MemUsed; // Memory allocated (in bytes)
- size_t PeakMem; // Peak memory used
- size_t PeakMemBase; // Temporary for peak calculation...
+ uint64_t Elapsed; // Wall clock time elapsed in seconds
+ uint64_t UserTime; // User time elapsed
+ uint64_t SystemTime; // System time elapsed
+ uint64_t MemUsed; // Memory allocated (in bytes)
+ uint64_t PeakMem; // Peak memory used
+ uint64_t PeakMemBase; // Temporary for peak calculation...
std::string Name; // The name of this time variable
bool Started; // Has this time variable ever been started?
TimerGroup *TG; // The TimerGroup this Timer is in.
@@ -49,10 +49,10 @@ public:
Timer(const Timer &T);
~Timer();
- double getProcessTime() const { return UserTime+SystemTime; }
- double getWallTime() const { return Elapsed; }
- ssize_t getMemUsed() const { return MemUsed; }
- size_t getPeakMem() const { return PeakMem; }
+ uint64_t getProcessTime() const { return UserTime+SystemTime; }
+ uint64_t getWallTime() const { return Elapsed; }
+ uint64_t getMemUsed() const { return MemUsed; }
+ uint64_t getPeakMem() const { return PeakMem; }
std::string getName() const { return Name; }
const Timer &operator=(const Timer &T) {