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

Function timefmt

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

Source from the content-addressed store, hash-verified

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

Callers 1

giantnode.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected