(tick)
| 107 | |
| 108 | @staticmethod |
| 109 | def GetUpdateStrByTick(tick): |
| 110 | now = int(time.time()) |
| 111 | day = (now - tick) // (24*3600) |
| 112 | hour = (now - tick) // 3600 |
| 113 | minute = (now - tick) // 60 |
| 114 | second = (now - tick) |
| 115 | |
| 116 | from tools.str import Str |
| 117 | if day > 0: |
| 118 | return "{}".format(day) + Str.GetStr(Str.DayAgo) |
| 119 | elif hour > 0: |
| 120 | return "{}".format(hour) + Str.GetStr(Str.HourAgo) |
| 121 | elif minute > 0: |
| 122 | return "{}".format(minute) + Str.GetStr(Str.MinuteAgo) |
| 123 | else: |
| 124 | return "{}".format(second) + Str.GetStr(Str.SecondAgo) |
| 125 | |
| 126 | @staticmethod |
| 127 | def GetDownloadSize(downloadLen): |
no test coverage detected