MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / sizeof_fmt

Function sizeof_fmt

src/class_singleWorker.py:32–37  ·  view source on GitHub ↗
(num, suffix='h/s')

Source from the content-addressed store, hash-verified

30# calculating POWs.
31
32def sizeof_fmt(num, suffix='h/s'):
33 for unit in ['','k','M','G','T','P','E','Z']:
34 if abs(num) < 1000.0:
35 return "%3.1f%s%s" % (num, unit, suffix)
36 num /= 1024.0
37 return "%.1f%s%s" % (num, 'Yi', suffix)
38
39class singleWorker(threading.Thread, StoppableThread):
40

Callers 2

sendMsgMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected