Skip to content

Commit 8ae60f9

Browse files
committed
Fix CPU Hog
Added a small delay to _run With fix CPU is under ~0.3% form ~ 18.0%
1 parent 816cdad commit 8ae60f9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

SimConnect/SimConnect.py

+1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def connect(self):
171171
def _run(self):
172172
while self.quit == 0:
173173
self.dll.CallDispatch(self.hSimConnect, self.my_dispatch_proc_rd, None)
174+
time.sleep(.001)
174175

175176
def exit(self):
176177
self.quit = 1

SimConnect/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def int_or_str(value):
1111
return value
1212

1313

14-
__version__ = "0.4.11"
14+
__version__ = "0.4.12"
1515
VERSION = tuple(map(int_or_str, __version__.split(".")))
1616

1717
__all__ = ["SimConnect", "Request", "Event", "millis", "DWORD", "AircraftRequests", "AircraftEvents", "FacilitiesRequests"]

0 commit comments

Comments
 (0)