def check_time(timer_id):
if timer_id not in _g_timers:<EOL><INDENT>_g_timers[timer_id] = Timer()<EOL>return <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>return _g_timers[timer_id].since_last_check()<EOL><DEDENT>
Add check points in a single line.

    This method is suitable for running a task on a list of items. A timer will
    be registered when the method is called for the first time.

    :Example:

    >>> import time
    >>> import mmcv
    >>> for i in range(1, 6):
    >>>     # simulate a code block
    >>>     time.sleep(i)
    >>>     mmcv.check_time('task1')
    2.000
    3.000
    4.000
    5.000

    Args:
        timer_id (str): Timer identifier.