public static function get($format = self::SECONDS)
        {
            // stop timer if it is still running
            if (static::$_running === true) {
                // ThinLog('Forcing timer to stop', E_USER_NOTICE);
                static::stop();
            }

            // reset all values
            $sec = 0;
            $usec = 0;

            // loop through each time entry
            foreach (static::$_queue as $time) {
                // start and end times
                $start = $time[static::CMD_START];
                $end = $time[static::CMD_STOP];

                // calculate difference between start and end seconds
                $sec_diff = $end['sec'] - $start['sec'];

                // if starting and finishing seconds are the same
                if ($sec_diff === 0) {
                    // only add the microseconds difference
                    $usec += ($end['usec'] - $start['usec']);

                } else {
                    // add the difference in seconds (compensate for microseconds)
                    $sec += $sec_diff - 1;

                    // add the difference time between start and end microseconds
                    $usec += (static::USECDIV - $start['usec']) + $end['usec'];
                }
            }

            if ($usec > static::USECDIV) {
                // move the full second microseconds to the seconds' part
                $sec += (int) floor($usec / static::USECDIV);

                // keep only the microseconds that are over the static::USECDIV
                $usec = $usec % static::USECDIV;
            }

            switch ($format) {
                case static::MICROSECONDS:
                    return ($sec * static::USECDIV) + $usec;

                case static::MILLISECONDS:
                    return ($sec * 1000) + (int) round($usec / 1000, 0);

                case static::SECONDS:
                default:
                    return (float) $sec + (float) ($usec / static::USECDIV);
            }
        }