public function time($key, \Closure $fn, $sampleRate = 1)
    {
        $this->startTiming($key);
        $return = $fn();
        $this->endTiming($key, $sampleRate);
        return $return;
    }
public function time($key, \Closure $fn, $sampleRate = 1)
    {
        $this->startTiming($key);
        $return = $fn();
        $this->endTiming($key, $sampleRate);
        return $return;
    }
public function time ( $ key , \ Closure $ fn , $ sampleRate = 1 ) { $ this -> startTiming ( $ key ) ; $ return = $ fn ( ) ; $ this -> endTiming ( $ key , $ sampleRate ) ; return $ return ; }
Executes a Closure and records it's execution time and sends it to StatsD
returns the value the Closure returned

@param string $key
@param \Closure $fn
@param int|float $sampleRate the rate (0-1) for sampling.
@return mixed
Executes a Closure and records it s execution time and sends it to StatsD returns the value the Closure returned