1 //===- Timer.h ----------------------------------------------*- C++ -*-===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLD_COMMON_TIMER_H
11 #define LLD_COMMON_TIMER_H
13 #include "llvm/ADT/DenseMap.h"
14 #include "llvm/ADT/StringRef.h"
25 explicit ScopedTimer(Timer &T);
36 Timer(llvm::StringRef Name, Timer &Parent);
44 double millis() const;
47 explicit Timer(llvm::StringRef Name);
48 void print(int Depth, double TotalDuration, bool Recurse = true) const;
50 std::chrono::time_point<std::chrono::high_resolution_clock> StartTime;
51 std::chrono::nanoseconds Total;
52 std::vector<Timer *> Children;