MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / print_used_time

Method print_used_time

lite/example/cpp_example/helper.h:74–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 return static_cast<double>(u.count()) / 1000000.0;
73 }
74 void print_used_time(int iter) {
75 m_stop = Clock::now();
76 std::chrono::duration<double> elapsed = m_stop - m_start;
77 Nsec u = std::chrono::duration_cast<Nsec>(elapsed);
78 printf("%s used time %f ms\n", (m_name + std::to_string(iter)).c_str(),
79 static_cast<double>(u.count()) / 1000000.0);
80 }
81 void reset_start() { m_start = Clock::now(); }
82
83private:

Callers 3

basic_load_from_pathFunction · 0.45
load_from_path_run_cudaFunction · 0.45

Calls 2

to_stringFunction · 0.85
countMethod · 0.45

Tested by

no test coverage detected