SF: Clean up dumpsys for Scheduler
Split dump into three flags corresponding to Scheduler, EventThread, and
VsyncReactor. Expand utils::Dumper to automate more types.
Bug: 241285191
Test: dumpsys SurfaceFlinger --scheduler
Test: dumpsys SurfaceFlinger --events
Test: dumpsys SurfaceFlinger --vsync
Change-Id: I17b3b772cd164305e2fe0239638b1a08236c12a2
diff --git a/services/surfaceflinger/Scheduler/OneShotTimer.h b/services/surfaceflinger/Scheduler/OneShotTimer.h
index 2017c31..f95646c 100644
--- a/services/surfaceflinger/Scheduler/OneShotTimer.h
+++ b/services/surfaceflinger/Scheduler/OneShotTimer.h
@@ -23,6 +23,7 @@
#include "../Clock.h"
#include <android-base/thread_annotations.h>
+#include <scheduler/Time.h>
namespace android {
namespace scheduler {
@@ -42,6 +43,8 @@
std::unique_ptr<Clock> clock = std::make_unique<SteadyClock>());
~OneShotTimer();
+ Duration interval() const { return mInterval; }
+
// Initializes and turns on the idle timer.
void start();
// Stops the idle timer and any held resources.
@@ -49,8 +52,6 @@
// Resets the wakeup time and fires the reset callback.
void reset();
- std::string dump() const;
-
private:
// Enum to track in what state is the timer.
enum class TimerState {