def _update_range(self, tmin, tmax): imin = int(math.floor(tmin / self._tinc)) imax = int(math.floor(tmax / self._tinc) + 1) todo = [] for i in xrange(imin, imax): wmin = i * self._tinc wmax = (i + 1) * self._tinc mtime = util.gmctime(self._base.get_newest_mtime(wmin, wmax)) if i not in self._blocks or self._blocks[i].mtime != mtime: if i not in self._blocks: self._blocks[i] = ShadowBlock() todo.append(i) self._blocks[i].mtime = mtime else: if todo: self._process_blocks(todo[0], todo[-1] + 1) todo = [] if todo: self._process_blocks(todo[0], todo[-1] + 1)
def __str__(self): return ' '.join([self.wid2.station, self.wid2.channel, self.wid2.auxid, self.wid2.sub_format, util.gmctime(self.wid2.tmin)])
def format(self, value): return util.gmctime(value)