def play(self):
if self.playback:
this_time = time.time()
delta = this_time - self._last_tick
self._last_tick = time.time()
time_data = self.brain._data["time"]
times = np.arange(self.brain._n_times)
time_shift = delta * self.playback_speed
max_time = np.max(time_data)
time_point = min(self.brain._current_time + time_shift, max_time)
// always use linear here -- this does not determine the data
// interpolation mode, it just finds where we are (in time) in
// terms of the time indices
idx = np.interp(time_point, time_data, times)