function calcDelay(optionsDelay) {
  const delay = {};

  if (optionsDelay === undefined) {
    return {...defaultDelay};
  }

  if (typeof optionsDelay === 'number') {
    for (const key in defaultDelay) {
      if (Object.prototype.hasOwnProperty.call(defaultDelay, key)) {
        delay[key] = optionsDelay;
      }
    }
    return delay;
  }

  for (const key in defaultDelay) {
    if (Object.prototype.hasOwnProperty.call(defaultDelay, key)) {
      if (optionsDelay[key] === undefined) {
        delay[key] = defaultDelay[key];
      } else {
        delay[key] = optionsDelay[key];
      }
    }
  }

  return delay;
}
Calculate the delay of each sensor through the delay in the options
@param {undefined|Number|Object} optionsDelay - the delay in the options
@return {Object}