Exemple #1
0
 def calc_max_snapshots(self) -> int:
     """int: total snapshot should be in snapshot list.
     
     NOTE: this property will return max number that can contains all the frame state to the end.
     you can use a small size to hold states, when hit the limitation, oldest one will be overwrote
     """
     return  self._max_snapshots if self._max_snapshots is not None else total_frames(self._start_tick, self._max_tick, self._snapshot_resolution)
    def calc_max_snapshots(self) -> int:
        """Helper method to calculate total snapshot should be in snapshot list with parameters passed via constructor.

        NOTE:
            This method will return max number that can contains all the frame state to the end.
            You can use a small size to hold states, when hit the limitation, oldest one will be overwrote.

        Returns:
            int: Max snapshot number for current configuration.
        """
        return self._max_snapshots if self._max_snapshots is not None \
            else total_frames(self._start_tick, self._max_tick, self._snapshot_resolution)