The duration of a single repition of the interval
176131
function () {
            if (this._duration) {
                return this._duration;
            }
            if (this._start && this._end) {
                return moment.duration(this._end - this._start);
            }
            else {
                return moment.duration(0);
            }
        }
272865
def narrow(self):
        """"""
        t, h = self.time, self.half_duration
        h /= self.scaling_coeff_x
        self.set_interval((t - h, t + h))
465161
def __period_remaining(self):
        '''
        
        '''
        elapsed = self.clock() - self.last_reset
        return self.period - elapsed
299864
def time_segments_average(X, interval, time_column):
    """"""
    warnings.warn(_TIME_SEGMENTS_AVERAGE_DEPRECATION_WARNING, DeprecationWarning)

    if isinstance(X, np.ndarray):
        X = pd.DataFrame(X)

    X = X.sort_values(time_column).set_index(time_column)

    start_ts = X.index.values[0]
    max_ts = X.index.values[-1]

    values = list()
    index = list()
    while start_ts <= max_ts:
        end_ts = start_ts + interval
        subset = X.loc[start_ts:end_ts - 1]
        means = subset.mean(skipna=True).values
        values.append(means)
        index.append(start_ts)
        start_ts = end_ts

    return np.asarray(values), np.asarray(index)
1271033
def discardi(self, begin, end, data=None):
        
        return self.discard(Interval(begin, end, data))
682958
def duration(self):
        
        self._check_ps()

        rstar = self.system.central.radius
        k = self.r/rstar
        dur = self.period / np.pi
        arg = rstar/self.a * np.sqrt((1+k)**2 - self.b**2)
        arg /= np.sin(np.radians(self.incl))
        dur *= np.arcsin(arg)
        if self.e > 0.0:
            dur *= np.sqrt(1 - self.e**2) / (1 + self.e * np.sin(self.omega))
        return dur
492172
def is_valid_interval(interval):
    
    if not isinstance(interval, (int, long)):
        return False

    if interval <= 0:
        return False

    return True
1347222
def duration(self):
        
        return units.Quantity(self.span[1] - self.span[0], self.xunit,
                              dtype=float)
25715
def _find_intervals(bundles, duration, step):
    """"""
    segments = []
    for bund in bundles:
        beg, end = bund['times'][0][0], bund['times'][-1][1]

        if end - beg >= duration:
            new_begs = arange(beg, end - duration, step)

            for t in new_begs:
                seg = bund.copy()
                seg['times'] = [(t, t + duration)]
                segments.append(seg)

    return segments
482950
def interval(best,lo=np.nan,hi=np.nan):
    
    return [float(best),[float(lo),float(hi)]]
1070933
private boolean containsInterval(Interval i) {
        if (i != null) {
            return directedGraph.contains(i.getStart())
                    && directedGraph.contains(i.getFinish());
        } else {
            return false;
        }
    }
1133082
def in_single_path(self):
        
        return len(self.successor) == 1 and not self.successor[0].in_or_out and \
               len(self.precedence) == 1 and len(self.precedence[0].successor) <= 1
169190
def pulse(time, start, duration):
    
    t = time()
    return 1 if start <= t < start + duration else 0
49517
function(bpm, beatUnit) {
    var secs = (60 / bpm) / (this.duration.value / 4) / (beatUnit / 4);
    return secs * 2 - secs / Math.pow(2, this.duration.dots);
  }
850550
def _interval(dates):
        """"""
        interval = (dates[1] - dates[0]).days
        last = dates[0]
        for dat in dates[1:]:
            if (dat - last).days != interval:
                return 0
            last = dat
        return interval
958077
def fmt_duration(secs):
    """"""
    return ' '.join(fmt.human_duration(secs, 0, precision=2, short=True).strip().split())
1309188
def range(*args, interval=0):
    
    agen = from_iterable.raw(builtins.range(*args))
    return time.spaceout.raw(agen, interval) if interval else agen