public static function spinner()
    {
        static $spinner = 0;
        static $mtime = null;

        // static $chars = '-\|/';
        static $chars = '-.*.-';

        $now = microtime(true);
        if (null === $mtime || ($mtime < $now - 0.1)) {
            $mtime = $now;
            self::clearLine();
            echo $chars[$spinner];
            $spinner++;

            if ($spinner > strlen($chars) - 1) {
                $spinner = 0;
            }
        }
    }