Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def updateStatus(self, force=False):
- #only update if last update was more than a second ago
- dt = time() - self.lastUpdate
- if force or dt > self.UPDATE_TIME:
- rate = self.rate if (not self.miner.idle) else 0
- type = " [" + str(self.connectionType) + "]" if self.connectionType is not None else ''
- status = (
- "[" + formatNumber(rate) + "hash/sec] "
- "[" + str(self.accepted) + " Accepted] "
- "[" + str(self.invalid) + " Rejected]" + type)
- self.say(status)
- self.lastUpdate = time()
- # begin phstats extra lines
- statfile = file('/dev/shm/phstats', 'w')
- statfile.write(formatNumber(rate) + " " + str(self.accepted) + " " + str(self.invalid))
- statfile.close()
- # end phstats extra lines
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement