(self)
| 771 | ', '.join(args)) |
| 772 | |
| 773 | def __str__(self): |
| 774 | mm, ss = divmod(self._seconds, 60) |
| 775 | hh, mm = divmod(mm, 60) |
| 776 | s = "%d:%02d:%02d" % (hh, mm, ss) |
| 777 | if self._days: |
| 778 | def plural(n): |
| 779 | return n, abs(n) != 1 and "s" or "" |
| 780 | s = ("%d day%s, " % plural(self._days)) + s |
| 781 | if self._microseconds: |
| 782 | s = s + ".%06d" % self._microseconds |
| 783 | return s |
| 784 | |
| 785 | def total_seconds(self): |
| 786 | """Total seconds in the duration.""" |