contrib/perf.py
changeset 27303 57bd9c5431a5
parent 27286 528cf1a73ae5
child 27304 a6fd79495770
equal deleted inserted replaced
27302:faca4adfed0a 27303:57bd9c5431a5
    13 command = cmdutil.command(cmdtable)
    13 command = cmdutil.command(cmdtable)
    14 
    14 
    15 def gettimer(ui, opts=None):
    15 def gettimer(ui, opts=None):
    16     """return a timer function and formatter: (timer, formatter)
    16     """return a timer function and formatter: (timer, formatter)
    17 
    17 
    18     This functions exist to gather the creation of formatter in a single
    18     This function exists to gather the creation of formatter in a single
    19     place instead of duplicating it in all performance command."""
    19     place instead of duplicating it in all performance commands."""
    20 
    20 
    21     # enforce an idle period before execution to counteract power management
    21     # enforce an idle period before execution to counteract power management
    22     # experimental config: perf.presleep
    22     # experimental config: perf.presleep
    23     time.sleep(ui.configint("perf", "presleep", 1))
    23     time.sleep(ui.configint("perf", "presleep", 1))
    24 
    24