(self, limit=0)
| 11 | maxChunkSize = 131072 |
| 12 | |
| 13 | def __init__(self, limit=0): |
| 14 | self.limit = limit |
| 15 | self.speed = 0 |
| 16 | self.chunkSize = Throttle.maxChunkSize |
| 17 | self.txTime = int(time.time()) |
| 18 | self.txLen = 0 |
| 19 | self.total = 0 |
| 20 | self.timer = threading.Event() |
| 21 | self.lock = threading.RLock() |
| 22 | self.resetChunkSize() |
| 23 | |
| 24 | def recalculate(self): |
| 25 | with self.lock: |
no test coverage detected