Replaced Sweeptime through sleep (0.01) due to no use on CPU Load
This commit is contained in:
@@ -321,14 +321,12 @@ if __name__ == "__main__":
|
||||
srfid.connect ((c_rfidip, c_rfidport))
|
||||
herdefiletslatch = None
|
||||
herdechanged = 0
|
||||
herdelastsweep = 0
|
||||
readbuffer = ''
|
||||
rfidonline = 0
|
||||
rfidnr = ''
|
||||
while 1:
|
||||
nt = time ()
|
||||
if c_herde and ((nt -herdelastsweep) > 1):
|
||||
herdelastsweep = nt
|
||||
sleep (0.01)
|
||||
if c_herde:
|
||||
if Path (c_herdepath + c_herdereadfile).exists ():
|
||||
_herdets = os.stat (c_herdepath + c_herdereadfile).st_mtime
|
||||
if herdefiletslatch and not herdechanged and herdefiletslatch != _herdets:
|
||||
|
||||
Reference in New Issue
Block a user