| 137 | |
| 138 | |
| 139 | class CallBack(object): |
| 140 | def __init__(self): |
| 141 | self._lock = threading.Lock() |
| 142 | self._pygame_clock = pygame.time.Clock() |
| 143 | self._current_fps = 0 |
| 144 | |
| 145 | def __call__(self, data): |
| 146 | self._pygame_clock.tick() |
| 147 | self._current_fps = self._pygame_clock.get_fps() |
| 148 | |
| 149 | def get_fps(self): |
| 150 | with self._lock: |
| 151 | return self._current_fps |
| 152 | |
| 153 | |
| 154 | def create_environment(world, sensors, n_vehicles, n_walkers, spawn_points, client): |
no outgoing calls
no test coverage detected