public function endTiming($key, $sampleRate = 1)
    {
        $end = gettimeofday(true);
        if (isset($this->timings[$key])) {
            $timing = ($end - $this->timings[$key]) * 1000;
            $this->timing($key, $timing, $sampleRate);
            unset($this->timings[$key]);
            return $timing;
        }
        return null;
    }
public function endTiming($key, $sampleRate = 1)
    {
        $end = gettimeofday(true);
        if (isset($this->timings[$key])) {
            $timing = ($end - $this->timings[$key]) * 1000;
            $this->timing($key, $timing, $sampleRate);
            unset($this->timings[$key]);
            return $timing;
        }
        return null;
    }
public function endTiming ( $ key , $ sampleRate = 1 ) { $ end = gettimeofday ( true ) ; if ( isset ( $ this -> timings [ $ key ] ) ) { $ timing = ( $ end - $ this -> timings [ $ key ] ) * 1000 ; $ this -> timing ( $ key , $ timing , $ sampleRate ) ; unset ( $ this -> timings [ $ key ] ) ; return $ timing ; } return null ; }
Ends the timing for a key and sends it to StatsD

@param string $key
@param int|float $sampleRate the rate (0-1) for sampling.
@return float|null
Ends the timing for a key and sends it to StatsD