Python Forum
need better than time.time()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need better than time.time()
#1
when running fast, two calls to time.time() can return the same value. time.time() does do better than one second resolution but not good enough for each call to be unique without slowing the code. does anyone know of a better source of discrete time? i am doing this on Linux so a Linux-only solution is adequate though a portable solution would be preferred. this may be OS-limited in terms of actual time resolution available. but i prefer a Python solution until i learn to do C calls in Python. i don't know if there is even a solution in C because of the OS-limit.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
need better than time.time() - by Skaperen - Apr-03-2019, 03:18 AM
RE: need better than time.time() - by Larz60+ - Apr-03-2019, 03:47 AM
RE: need better than time.time() - by Skaperen - Apr-04-2019, 02:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Filer and sort files by modification time in a directory tester_V 4 91 37 minutes ago
Last Post: Pedroski55
Question Convert UTC now() to local time to compare to a strptime() Calab 2 149 Apr-29-2024, 07:24 PM
Last Post: deanhystad
  Date Time Series Help...Please spra8560 2 399 Feb-01-2024, 01:38 PM
Last Post: spra8560
  Python date format changes to date & time 1418 4 640 Jan-20-2024, 04:45 AM
Last Post: 1418
  time difference bettwenn logs enkliy 14 1,028 Nov-21-2023, 04:51 PM
Last Post: rob101
Question Need Help with Vehicle Routing Problem with Time Windows (VRPTW) in Python kasper321421312 1 594 Nov-10-2023, 08:19 PM
Last Post: snippsat
  How do I stream and record at the same time with arducam? traderjoe 0 481 Oct-23-2023, 12:01 AM
Last Post: traderjoe
  i tried to install python for the first time today and pretty certain im being remote brianlj 2 567 Oct-03-2023, 11:15 AM
Last Post: snippsat
  [Python 2.7] Why can't I press [ESC] a fourth time? Ashwood 3 675 Aug-27-2023, 02:01 PM
Last Post: deanhystad
  Hard time trying to figure out the difference between two strings carecavoador 2 693 Aug-16-2023, 04:53 PM
Last Post: carecavoador

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020