code: void update_upd(long new_upd)
  	{
  		if (new_upd < 1000)
  		{
  			upd.tv_usec = (int)(new_upd * 1000);
  			upd.tv_sec = 0;
  		}
  		else
  		{
  			upd.tv_sec = (int)( new_upd / 1000);
  			upd.tv_usec = (int)((new_upd - (upd.tv_sec * 1000)) * 1000);
  		}
  		max_delta_t = (int)(new_upd / 1000.0) * dev.get_poll_old_factor();	
  	}
docs: ==========================================================================