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;
    }
  }
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;
    }
  }
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 ; } }
Confronts the current result with the one kept in database.

@param $id
@return bool
Confronts the current result with the one kept in database .