Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

        def humanize_time(milli, str_output=True):
  sec, milli = divmod(milli, 1000)
  min, sec = divmod(sec, 60)
  hours, min = divmod(min, 60)
  if str_output:
    return '%s%02d:%02d' % (hours and '%02d:' % hours or '', min, sec)
  else:
    hours, min, sec
        


src/c/c/ccx2-HEAD/src/ccx2/nowplaying.py   ccx2(Download)
 
    self.ctx['status'] = status_desc[self.status]
    self.ctx['elapsed'] = util.humanize_time(self.time)
    if 'duration' in self.info:
      self.ctx['total'] = util.humanize_time(self.info['duration'])

src/c/c/ccx2-HEAD/src/ccx2/main.py   ccx2(Download)
  def _update(self):
    self.ctx['status'] = HeaderBar.status_desc[self.status]
    self.ctx['elapsed'] = util.humanize_time(self.time)
    if 'duration' in self.info:
      self.ctx['total'] = util.humanize_time(self.info['duration'])