mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 05:07:43 +00:00
Per-stage shader hashing
This commit is contained in:
@@ -8,15 +8,18 @@ class CStopwatch {
|
||||
|
||||
public:
|
||||
CStopwatch() : m_start(std::chrono::steady_clock::now()) {}
|
||||
void report(const char* name) const {
|
||||
printf("%s %f\n", name,
|
||||
std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - m_start).count() /
|
||||
1000000.f);
|
||||
double report(const char* name) const {
|
||||
double t = std::chrono::duration_cast<std::chrono::microseconds>(
|
||||
std::chrono::steady_clock::now() - m_start).count() / 1000000.0;
|
||||
printf("%s %f\n", name, t);
|
||||
return t;
|
||||
}
|
||||
void reportReset(const char* name) {
|
||||
double reportReset(const char* name) {
|
||||
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
||||
printf("%s %f\n", name, std::chrono::duration_cast<std::chrono::microseconds>(now - m_start).count() / 1000000.f);
|
||||
double t = std::chrono::duration_cast<std::chrono::microseconds>(now - m_start).count() / 1000000.0;
|
||||
printf("%s %f\n", name, t);
|
||||
m_start = now;
|
||||
return t;
|
||||
}
|
||||
};
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user