14using Clock = std::chrono::steady_clock;
28 start_ = Clock::now();
48 : name_(std::move(name)),
49 total_count_(total_count),
53 start_ = Clock::now();
61#define SCOPED_TIMER(name) blender::timeit::ScopedTimer scoped_timer(name)
67#define SCOPED_TIMER_AVERAGED(name) \
68 static int64_t total_count_; \
69 static blender::timeit::Nanoseconds total_time_; \
70 static blender::timeit::Nanoseconds min_time_ = blender::timeit::Nanoseconds::max(); \
71 blender::timeit::ScopedTimerAveraged scoped_timer(name, total_count_, total_time_, min_time_)
ScopedTimerAveraged(std::string name, int64_t &total_count, Nanoseconds &total_time, Nanoseconds &min_time)
ScopedTimer(std::string name)
std::chrono::nanoseconds Nanoseconds
Clock::time_point TimePoint
std::chrono::steady_clock Clock
void print_duration(Nanoseconds duration)