59 template <
typename ArchiveType>
61 serialize(ArchiveType& ar)
70 start_time_ = std::chrono::high_resolution_clock::now();
76 using std::chrono::duration;
77 using std::chrono::duration_cast;
78 end_time_ = std::chrono::high_resolution_clock::now();
79 std::chrono::duration<double> time_increment(0.0);
80 if (end_time_ > start_time_) { time_increment = duration_cast<duration<double>>(end_time_ - start_time_); }
81 total_time_ += time_increment.count();
91 std::chrono::time_point<std::chrono::high_resolution_clock> start_time_;
92 std::chrono::time_point<std::chrono::high_resolution_clock> end_time_;
104 template <
typename ArchiveType>
106 serialize(ArchiveType& ar)
140 return timers_.at(name).GetElapsedTime();
Definition nimble_timer.h:54
double GetElapsedTime() const
Definition nimble_timer.h:85
void Start()
Definition nimble_timer.h:68
TimeKeeper()
Definition nimble_timer.h:56
void Stop()
Definition nimble_timer.h:74
double StopReport(const std::string &name)
Definition nimble_timer.h:127
void Start(const std::string &name)
Definition nimble_timer.h:113
void Stop(const std::string &name)
Definition nimble_timer.h:120
double ElapsedTime(const std::string &name) const
Definition nimble_timer.h:138
std::map< std::string, TimeKeeper > timers_
Definition nimble_timer.h:143
Definition kokkos_contact_manager.h:49