示例#1
0
 def __repr__(self):
     name = self._clean(self.firstAttr('type'))
     start = utils.millisecondToHumanstr(
         self._clean(self.firstAttr('start')))
     end = utils.millisecondToHumanstr(self._clean(self.firstAttr('end')))
     offsets = '%s-%s' % (start, end)
     return '<%s>' % ':'.join([self.__class__.__name__, name, offsets])
示例#2
0
 def __repr__(self):
     name = self._clean(self.firstAttr('type'))
     start = utils.millisecondToHumanstr(
         self._clean(self.firstAttr('start')))
     end = utils.millisecondToHumanstr(self._clean(self.firstAttr('end')))
     return '<%s:%s %s - %s>' % (self.__class__.__name__, name, start, end)
示例#3
0
def test_millisecondToHumanstr():
    res = utils.millisecondToHumanstr(1000)
    assert res == "00:00:01.0000"