libretro.drivers.perf.driver¶
Protocol definition for the performance counter interface.
See also
libretro.api.perfThe matching
ctypestypes and callback definitions.
Classes
Protocol for drivers that expose the libretro performance-counter interface. |
- class PerfDriver[source]¶
Bases:
ProtocolProtocol for drivers that expose the libretro performance-counter interface.
See also
libretro.api.perfThe matching
ctypestypes and callback definitions.
- abstractmethod get_time_usec()[source]¶
Return the current wall-clock time in microseconds.
See also
retro_perf_get_time_usec_tThe C function pointer type whose signature this method implements.
- Return type:
- abstractmethod get_cpu_features()[source]¶
Return a bitmask of CPU features available to the core.
See also
CpuFeaturesBit flags describing each supported CPU feature.
- Return type:
- abstractmethod get_perf_counter()[source]¶
Return the current value of the high-resolution performance counter.
Units are driver-defined but consistent within a single process.
See also
retro_perf_get_counter_tThe C function pointer type whose signature this method implements.
- Return type:
- abstractmethod perf_register(counter)[source]¶
Register a new performance counter with the driver.
- Parameters:
counter (
retro_perf_counter) – The counter struct to register.
See also
retro_perf_register_tThe C function pointer type whose signature this method implements.
- Return type:
- abstractmethod perf_start(counter)[source]¶
Start measuring a previously registered performance counter.
- Parameters:
counter (
retro_perf_counter) – The counter to start.
See also
retro_perf_start_tThe C function pointer type whose signature this method implements.
- Return type:
- abstractmethod perf_stop(counter)[source]¶
Stop measuring a previously started performance counter.
- Parameters:
counter (
retro_perf_counter) – The counter to stop.
See also
retro_perf_stop_tThe C function pointer type whose signature this method implements.
- Return type:
- abstractmethod perf_log()[source]¶
Emit accumulated performance-counter measurements to the driver’s log sink.
See also
retro_perf_log_tThe C function pointer type whose signature this method implements.
- Return type:
- __init__(*args, **kwargs)¶
- classmethod __new__(*args, **kwargs)¶