MCPcopy Index your code
hub / github.com/pyload/pyload / formatETA

Method formatETA

module/PyFile.py:227–235  ·  view source on GitHub ↗

formats eta to readable format

(self)

Source from the content-addressed store, hash-verified

225 return formatSize(self.getSize())
226
227 def formatETA(self):
228 """ formats eta to readable format """
229 seconds = self.getETA()
230
231 if seconds < 0: return "00:00:00"
232
233 hours, seconds = divmod(seconds, 3600)
234 minutes, seconds = divmod(seconds, 60)
235 return "%.2i:%.2i:%.2i" % (hours, minutes, seconds)
236
237 def getSpeed(self):
238 """ calculates speed """

Callers 1

statusDownloadsMethod · 0.80

Calls 1

getETAMethod · 0.95

Tested by

no test coverage detected