mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-28 22:33:17 +00:00
Frame graph + Precise 60 fps timing (#998)
* video info: add frame graph Toggle advanced info with CTRL+F10. Also fixed imgui using gamepad for nav in wrong situations * 60fps! Implemented a timer that accumulates the time spent sleeping and sleeps for the remaining time. Also measure entire PresentThread time instead of just the time spent in Flip. * sceKernelGettimeofday: replace chrono by win32 api. Better performance bb uses this function too much. Consuming almost 30% of cpu time
This commit is contained in:
parent
a016792371
commit
5a8e8f5936
8 changed files with 183 additions and 26 deletions
|
@ -23,4 +23,18 @@ void SetCurrentThreadPriority(ThreadPriority new_priority);
|
|||
|
||||
void SetCurrentThreadName(const char* name);
|
||||
|
||||
class AccurateTimer {
|
||||
std::chrono::nanoseconds target_interval{};
|
||||
std::chrono::nanoseconds total_wait{};
|
||||
|
||||
std::chrono::high_resolution_clock::time_point start_time;
|
||||
|
||||
public:
|
||||
explicit AccurateTimer(std::chrono::nanoseconds target_interval);
|
||||
|
||||
void Start();
|
||||
|
||||
void End();
|
||||
};
|
||||
|
||||
} // namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue