joxeankoret / diaphora

Diaphora, the most advanced Free and Open Source program diffing tool.
http://diaphora.re
GNU Affero General Public License v3.0
3.58k stars 371 forks source link

Use time.monotonic() instead of time.time() #220

Closed BlueAmulet closed 3 years ago

BlueAmulet commented 3 years ago

Whenever the system time changes, as a result of DST or VM resuming, the result of time.time() can wildly change throwing off any ETA estimate, elapsed time measure, or timeouts.

time.monotonic() has the same resolution and tick rate as time.time() does, except that it's not affected by system time changes, and has been around since python 3.3 for compatibility concern.

joxeankoret commented 3 years ago

Done!

fr0gger commented 1 year ago

Hey, I get an error with monotonic on IDA 7.2, it is fixed by using time.time() instead. :)

BlueAmulet commented 1 year ago

IDA before 7.4 uses Python 2 See https://github.com/joxeankoret/diaphora/issues/197