Rarst\Laps\Laps::tick PHP Method

tick() public static method

Mark action for the event on Stopwatch.
public static tick ( mixed $input = null ) : mixed
$input mixed pass through if added to filter
return mixed
    public static function tick($input = null)
    {
        global $wp_filter;
        $filter = current_filter();
        $priority = key($wp_filter[$filter]);
        if ('callbacks' === $priority) {
            // Fails on WP 4.7, see https://core.trac.wordpress.org/ticket/39007
            return $input;
        }
        $event = wp_parse_args(self::$events[$filter][$priority], array('action' => 'start', 'category' => null));
        if ('stop' === $event['action'] && !self::$stopwatch->isStarted($event['event'])) {
            return $input;
        }
        self::$stopwatch->{$event['action']}($event['event'], $event['category']);
        return $input;
    }