summaryrefslogtreecommitdiff
path: root/include/lld/Common/Timer.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:32 +0000
commitf1e1c239e31b467e17f1648b1f524fc9ab5b431a (patch)
treea855e7a2a8808555da60e6aa9601d6867eb23bac /include/lld/Common/Timer.h
parent7d6988fdd2aee0e033034e147f16fe05594a60e4 (diff)
Notes
Diffstat (limited to 'include/lld/Common/Timer.h')
-rw-r--r--include/lld/Common/Timer.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/include/lld/Common/Timer.h b/include/lld/Common/Timer.h
index 6654af6269192..4a298b04a30b5 100644
--- a/include/lld/Common/Timer.h
+++ b/include/lld/Common/Timer.h
@@ -1,9 +1,8 @@
//===- Timer.h ----------------------------------------------*- C++ -*-===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -22,18 +21,18 @@ namespace lld {
class Timer;
struct ScopedTimer {
- explicit ScopedTimer(Timer &T);
+ explicit ScopedTimer(Timer &t);
~ScopedTimer();
void stop();
- Timer *T = nullptr;
+ Timer *t = nullptr;
};
class Timer {
public:
- Timer(llvm::StringRef Name, Timer &Parent);
+ Timer(llvm::StringRef name, Timer &parent);
static Timer &root();
@@ -44,14 +43,14 @@ public:
double millis() const;
private:
- explicit Timer(llvm::StringRef Name);
- void print(int Depth, double TotalDuration, bool Recurse = true) const;
-
- std::chrono::time_point<std::chrono::high_resolution_clock> StartTime;
- std::chrono::nanoseconds Total;
- std::vector<Timer *> Children;
- std::string Name;
- Timer *Parent;
+ explicit Timer(llvm::StringRef name);
+ void print(int depth, double totalDuration, bool recurse = true) const;
+
+ std::chrono::time_point<std::chrono::high_resolution_clock> startTime;
+ std::chrono::nanoseconds total;
+ std::vector<Timer *> children;
+ std::string name;
+ Timer *parent;
};
} // namespace lld