def _index_as_time(index, sfreq, first_samp=0, use_first_samp=False):
    times = np.atleast_1d(index) + (first_samp if use_first_samp else 0)
    return times / sfreq
Convert indices to time
dataset/ETHPy150Open mne-tools/mne-python/mne/io/base.py/_index_as_time