1e882d05cab139530b2859bf4940c681f5b4b5e2,mne/viz/_brain/_timeviewer.py,_TimeViewer,play,#_TimeViewer#,422

Before Change



    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)

After Change



    @safe_event
    def play(self):
        if self.playback:
            try:
                self._advance()
            except Exception:
                self.playback = False
                raise

    def _advance(self):
        this_time = time.time()
        delta = this_time - self._last_tick
        self._last_tick = time.time()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: mne-tools/mne-python
Commit Name: 1e882d05cab139530b2859bf4940c681f5b4b5e2
Time: 2020-03-27
Author: larson.eric.d@gmail.com
File Name: mne/viz/_brain/_timeviewer.py
Class Name: _TimeViewer
Method Name: play


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 205df55987d9c62c13738bebc5ffe18b738f1c50
Time: 2018-11-08
Author: k.zhou@qmul.ac.uk
File Name: train_vidreid_xent.py
Class Name:
Method Name: main


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 3c431a3952415c49676954d534d00599f04b1f4e
Time: 2020-04-01
Author: mzaber@smu.edu
File Name: perfkitbenchmarker/vpn_service.py
Class Name: VPN
Method Name: isTunnelReady