linkagescape / linkage-mapper

ArcGIS tools to automate mapping and prioritization of wildlife habitat corridors
https://circuitscape.org/linkagemapper/
GNU General Public License v3.0
37 stars 12 forks source link

Replace time.clock with time.perf_counter #168

Closed dkav closed 1 year ago

dkav commented 1 year ago

Use time.perf_counter method when running in Python 3. time.clock was deprecated in Python 3.3 and removed in Python 3.8.

This is a merge from https://github.com/dkav/linkage-mapper/commit/1b9666db1f38410ee30cac98c2989b74709da118 and has not been tested for this pull request.

Fixes AttributeError: module 'time' has no attribute 'clock' issue raised in Google Groups.

johngallo commented 1 year ago

Looks great, thanks Darren. I like how you have it try the Python 3+ syntax, and then if an error arises, to then implement the Python 2 syntax. That should work for quite a while...I'm crunched right now so will release this as a beta for now, and not a full build (i.e. .pdfs instead of word, etc.).