public function addSuccess($time)
    {
        $total = ( $this->data['avg'] * $this->data['works'] )  + $time;
        $this->data['works']++;
        $this->data['avg'] = $total/$this->data['works'];

        return $this->data['works'];
    }
public function addSuccess($time)
    {
        $total = ( $this->data['avg'] * $this->data['works'] )  + $time;
        $this->data['works']++;
        $this->data['avg'] = $total/$this->data['works'];

        return $this->data['works'];
    }
public function addSuccess ( $ time ) { $ total = ( $ this -> data [ 'avg' ] * $ this -> data [ 'works' ] ) + $ time ; $ this -> data [ 'works' ] ++ ; $ this -> data [ 'avg' ] = $ total / $ this -> data [ 'works' ] ; return $ this -> data [ 'works' ] ; }
Record a success event

@param  integer $time mileseconds
@return integer Number of works succeed
Record a success event