def debug_get_timestamp_unit(space): unit = rtimer.get_timestamp_unit() if unit == rtimer.UNIT_TSC: unit_str = 'tsc' elif unit == rtimer.UNIT_NS: unit_str = 'ns' elif unit == rtimer.UNIT_QUERY_PERFORMANCE_COUNTER: unit_str = 'QueryPerformanceCounter' else: unit_str = 'UNKNOWN(%d)' % unit return space.newtext(unit_str)
def _ll_0_ll_get_timestamp_unit(): from rpython.rlib import rtimer return rtimer.get_timestamp_unit()
def rtimer_example(): t1 = rtimer.read_timestamp() print rtimer.get_timestamp_unit() t2 = rtimer.read_timestamp() print t2 - t1
def op_ll_get_timestamp_unit(): from rpython.rlib.rtimer import get_timestamp_unit return get_timestamp_unit()
def get_unit(): return rtimer.get_timestamp_unit()