mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-10-01 03:15:44 -04:00
Added profiling info to LocalInterface
This commit is contained in:
parent
8c167b8f3d
commit
648e9a68b8
@ -50,6 +50,9 @@ class LocalClientInterface(Interface):
|
|||||||
self.rxb = 0
|
self.rxb = 0
|
||||||
self.txb = 0
|
self.txb = 0
|
||||||
|
|
||||||
|
# TODO: Remove at some point
|
||||||
|
self.rxptime = 0
|
||||||
|
|
||||||
self.HW_MTU = 1064
|
self.HW_MTU = 1064
|
||||||
|
|
||||||
self.online = False
|
self.online = False
|
||||||
@ -138,13 +141,20 @@ class LocalClientInterface(Interface):
|
|||||||
if hasattr(self, "parent_interface") and self.parent_interface != None:
|
if hasattr(self, "parent_interface") and self.parent_interface != None:
|
||||||
self.parent_interface.rxb += len(data)
|
self.parent_interface.rxb += len(data)
|
||||||
|
|
||||||
|
# TODO: Remove at some point
|
||||||
|
processing_start = time.time()
|
||||||
|
|
||||||
self.owner.inbound(data, self)
|
self.owner.inbound(data, self)
|
||||||
|
|
||||||
|
# TODO: Remove at some point
|
||||||
|
duration = time.time() - processing_start
|
||||||
|
self.rxptime += duration
|
||||||
|
|
||||||
def processOutgoing(self, data):
|
def processOutgoing(self, data):
|
||||||
if self.online:
|
if self.online:
|
||||||
|
# TODO: Reset maybe?
|
||||||
while self.writing:
|
while self.writing:
|
||||||
time.sleep(0.01)
|
time.sleep(0.0005)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.writing = True
|
self.writing = True
|
||||||
|
Loading…
Reference in New Issue
Block a user