b1dce01d9d
FossilOrigin-Name: 2b8e1c48bdb444f0b08f9813fa09493455f801e058146e75a27acb35a2907393
23 lines
412 B
Python
23 lines
412 B
Python
# Benchmark Support
|
|
#
|
|
# This is intended to help support benchmarking by
|
|
# providing high resolution timing and instruction
|
|
# usage data.
|
|
#
|
|
|
|
import time
|
|
|
|
|
|
class BenchmarkDevice:
|
|
def __init__(self):
|
|
pass
|
|
|
|
def execute(self, retro_instance, pointer):
|
|
return 0
|
|
|
|
def timer_resolution(self):
|
|
try:
|
|
time.time_ns()
|
|
return 1
|
|
except:
|
|
return 0
|