Changeset e2592f0 in sasmodels for sasmodels/kernelcl.py
- Timestamp:
- Oct 9, 2018 3:23:53 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 7d97437
- Parents:
- 353e899
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelcl.py
rd86f0fc re2592f0 56 56 import time 57 57 58 try: 59 from time import perf_counter as clock 60 except ImportError: # CRUFT: python < 3.3 61 if sys.platform.count("darwin") > 0: 62 from time import time as clock 63 else: 64 from time import clock 65 58 66 import numpy as np # type: ignore 59 60 67 61 68 # Attempt to setup opencl. This may fail if the opencl package is not … … 575 582 # Call kernel and retrieve results 576 583 wait_for = None 577 last_nap = time.clock()584 last_nap = clock() 578 585 step = 1000000//self.q_input.nq + 1 579 586 for start in range(0, call_details.num_eval, step): … … 586 593 # Allow other processes to run 587 594 wait_for[0].wait() 588 current_time = time.clock()595 current_time = clock() 589 596 if current_time - last_nap > 0.5: 590 597 time.sleep(0.05)
Note: See TracChangeset
for help on using the changeset viewer.