View Source Ecspanse.Resource.FPS (ECSpanse v0.8.1)

A special resource provided by the framework to check the FPS in real-time. The framework also provides a special system that updates the FPS resource. The TrackFPS system needs to be added to the Server, in order to calculate the FPS.

  • value: the last second FPS value
  • current: the current frames accumulated this second
  • millisecond: the current millisecond of the second

A special resource provided by the framework for real-time FPS monitoring. The framework also includes a dedicated system that updates this FPS resource. To enable FPS calculation, the Ecspanse.System.TrackFPS system must be added to the Ecspanse.setup/1 as a sync system.

The FPS state fields are:

  • :value - the previous second's FPS value.
  • :current - the number of frames within the current second.
  • :millisecond - the current millisecond within the second.

Summary

Types

@type t() :: %Ecspanse.Resource.FPS{
  __meta__: term(),
  current: non_neg_integer(),
  millisecond: non_neg_integer(),
  value: non_neg_integer()
}

Functions

Callback implementation for Ecspanse.Resource.validate/1.