Skip to content

Update twampy.py#4

Open
TekunoKage wants to merge 1 commit intonokia:masterfrom
kafka-soda:master
Open

Update twampy.py#4
TekunoKage wants to merge 1 commit intonokia:masterfrom
kafka-soda:master

Conversation

@TekunoKage
Copy link

Change from .clock() to .perf_counter()

@dmat93
Copy link

dmat93 commented Sep 29, 2022

Also consider to update the method .isAlive() with the .is_alive() as recommended by python3.

megaexception pushed a commit to megaexception/twampy that referenced this pull request Jan 31, 2024
Resolve "telegraf reports "host" tag as ":20000""

Closes nokia#4

See merge request skhalavchuk/twampy!11
@wisotzky
Copy link
Member

HI @TekunoKage, thank you for spotting this and providing this PR. Indeed clock() has been deprecated and removed in the latest Python versions, so it requires an update of the Python script. Could you please review your change again? From my understanding perf_counter() is the new approach for high-resolution timestamps which is supposed to be platform independent. So ideally, I would ask you to apply your change in a way it works for all supported platforms.

If you don't have cycles, please let me know and I will give my own twist to apply this change.

Thx!

@wisotzky
Copy link
Member

Also consider to update the method .isAlive() with the .is_alive() as recommended by python3.

Fixed back December. Please ensure to either raise a PR or to highlight your issues as dedicated issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants