mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Time the stress test
This commit is contained in:
1 parent
b04e5925d2
commit
e0f73507f9
3 files changed
+20
-1
No files matched your search
@@ -7,3 +7,17 @@ double time_now_d();
|
||||
void sleep_ms(int ms);
|
||||
|
||||
void GetTimeFormatted(char formattedTime[13]);
|
||||
|
||||
// Rust-style Instant for clear and easy timing.
|
||||
class Instant {
|
||||
public:
|
||||
static Instant Now() {
|
||||
return Instant(time_now_d());
|
||||
}
|
||||
double Elapsed() const {
|
||||
return time_now_d() - instantTime_;
|
||||
}
|
||||
private:
|
||||
explicit Instant(double initTime) : instantTime_(initTime) {}
|
||||
double instantTime_;
|
||||
};
|
||||
Reference in new issue
Block a user