Raxol.UI.Rendering.TimerServer (Raxol v2.0.1)

View Source

Centralized timer management for the UI rendering pipeline.

Consolidates all rendering-related timers including:

  • Animation frame timers (60fps target)
  • Render debouncing timers
  • Adaptive frame rate timers
  • Pipeline processing timers
  • Frame rate monitoring timers

This reduces timer process overhead and provides consistent timer handling across all rendering components.

Summary

Functions

Returns a specification to start this module under a supervisor.

Gets current timer statistics for monitoring.

Starts an adaptive frame rate timer for dynamic performance adjustment.

Starts an animation frame timer that sends regular frame tick messages.

Starts a render debounce timer to batch rapid render requests.

Starts a frame rate monitoring timer for performance tracking.

Starts a pipeline processing timer for batch operations.

Stops all rendering timers.

Stops a specific timer type.

Updates the interval for a specific timer type.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_timer_stats()

@spec get_timer_stats() :: map()

Gets current timer statistics for monitoring.

handle_manager_cast(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.

start_adaptive_timer(target_pid, interval_ms \\ 2000)

@spec start_adaptive_timer(pid(), non_neg_integer()) :: :ok

Starts an adaptive frame rate timer for dynamic performance adjustment.

start_animation_timer(target_pid, interval_ms \\ 16)

@spec start_animation_timer(pid(), non_neg_integer()) :: :ok

Starts an animation frame timer that sends regular frame tick messages.

start_debounce_timer(target_pid, interval_ms \\ 8)

@spec start_debounce_timer(pid(), non_neg_integer()) :: :ok

Starts a render debounce timer to batch rapid render requests.

start_link(init_opts \\ [])

start_monitor_timer(target_pid, interval_ms \\ 1000)

@spec start_monitor_timer(pid(), non_neg_integer()) :: :ok

Starts a frame rate monitoring timer for performance tracking.

start_pipeline_timer(target_pid, interval_ms)

@spec start_pipeline_timer(pid(), non_neg_integer()) :: :ok

Starts a pipeline processing timer for batch operations.

stop_all_timers()

@spec stop_all_timers() :: :ok

Stops all rendering timers.

stop_timer(timer_type)

@spec stop_timer(atom()) :: :ok

Stops a specific timer type.

update_timer_interval(timer_type, new_interval_ms)

@spec update_timer_interval(atom(), non_neg_integer()) :: :ok

Updates the interval for a specific timer type.