Source

VPlayer / length.py

Full commit
class Length(int):
    def seconds(self):
        return self

    def minutes(self):
        return self/60

    def hours(self):
        return (self/60)/60

    def __str__(self):
        return '%02d:%02d:%02d' % ( self.hours(),
                                 self.minutes()-self.hours()*60,
                                 self.seconds() - self.hours()*60*60 - (self.minutes() - self.hours()*60)*60)

    def minutes_str(self):
        return '%02d:%02d' % (self.minutes(), self.seconds() - self.minutes()*60)