3 #include <unordered_map> 16 while ((c *= 1000)<a);
19 int t = (a%
c) / (c / 1000);
20 std::cout << (((c>
a) || (t>99)) ?
"" : ((t>9) ?
"0" :
"00")) <<
t;
21 std::cout << (((c /= 1000) == 1) ?
"" :
",");
27 std::unordered_map<const char*, double>
duration;
28 std::unordered_map<const char*, int>
counts;
29 std::unordered_map<
const char*,
30 std::chrono::high_resolution_clock::time_point>
lasts;
50 auto sec = std::chrono::duration_cast<std::chrono::seconds>(since_last).
count();
83 auto usec = std::chrono::duration_cast<std::chrono::microseconds>(
duration).
count();
90 std::chrono::high_resolution_clock::time_point
_started;
std::unordered_map< const char *, int > counts
static profiler & instance()
std::chrono::high_resolution_clock::time_point _started
std::unordered_map< const char *, std::chrono::high_resolution_clock::time_point > lasts
GLboolean GLboolean GLboolean GLboolean a
scoped_timer(const char *key)
std::unordered_map< const char *, double > duration