MCPcopy Create free account
hub / github.com/ElementsProject/lightning / timefmt

Function timefmt

contrib/giantnode.py:132–143  ·  view source on GitHub ↗
(number, time)

Source from the content-addressed store, hash-verified

130
131
132def timefmt(number, time):
133 if time == 0:
134 return '?'
135 seconds = number / time
136 minutes = seconds / 60
137 hours = minutes / 60
138 if hours > 2:
139 return '{} hours'.format(int(hours))
140 if minutes > 2:
141 return '{} minutes'.format(int(minutes))
142
143 return '{} seconds'.format(int(seconds))
144
145
146while num_total < args.num:

Callers 1

giantnode.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected