original_string: public function check_result($id)
    {
      if ( $d = $this->get($id) ){
        $t = new bbn\util\timer();
        $t->start();
        $res = $this->_exec($d['request'], $d['params']);
        $duration = (int)ceil($t->stop() * 1000);
        if ( $res !== $d['result'] ){
          $this->db->update('bbn_observers', [
            'result' => $res,
            'duration' => $duration
          ], [
            'id' => $id
          ]);
          return false;
        }
        return true;
      }
    }
code: public function check_result($id)
    {
      if ( $d = $this->get($id) ){
        $t = new bbn\util\timer();
        $t->start();
        $res = $this->_exec($d['request'], $d['params']);
        $duration = (int)ceil($t->stop() * 1000);
        if ( $res !== $d['result'] ){
          $this->db->update('bbn_observers', [
            'result' => $res,
            'duration' => $duration
          ], [
            'id' => $id
          ]);
          return false;
        }
        return true;
      }
    }
code_tokens: public function check_result ( $ id ) { if ( $ d = $ this -> get ( $ id ) ) { $ t = new bbn \ util \ timer ( ) ; $ t -> start ( ) ; $ res = $ this -> _exec ( $ d [ 'request' ] , $ d [ 'params' ] ) ; $ duration = ( int ) ceil ( $ t -> stop ( ) * 1000 ) ; if ( $ res !== $ d [ 'result' ] ) { $ this -> db -> update ( 'bbn_observers' , [ 'result' => $ res , 'duration' => $ duration ] , [ 'id' => $ id ] ) ; return false ; } return true ; } }
docstring: Confronts the current result with the one kept in database.
  
  @param $id
  @return bool
docstring_tokens: Confronts the current result with the one kept in database .