Skip to content

Commit

Permalink
Remove async client.idle_time(). (#2349)
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen authored Sep 30, 2024
1 parent fe3c775 commit 797ab49
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions pymodbus/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ def close(self, reconnect: bool = False) -> None:
else:
self.ctx.close()

def idle_time(self) -> float:
"""Time before initiating next transaction (call **sync**).
Applications can call message functions without checking idle_time(),
this is done automatically.
"""
if self.last_frame_end is None or self.silent_interval is None:
return 0
return self.last_frame_end + self.silent_interval

def execute(self, request: ModbusRequest):
"""Execute request and get response (call **sync/async**).
Expand Down
2 changes: 0 additions & 2 deletions test/sub_client/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,7 @@ async def test_client_instanciate(
# Test information methods
client.last_frame_end = 2
client.silent_interval = 2
assert client.idle_time() == 4
client.last_frame_end = None
assert not client.idle_time()

# a successful execute
client.connect = lambda: True
Expand Down

0 comments on commit 797ab49

Please sign in to comment.