// The Lucia project.
// Copyright 2023-2026 DSP, inc.  All rights reserved.
// Authors:
//   chiayin.kuo@dsp.im (chiayin), 2023/1/31
//   imacat.yang@dsp.im (imacat), 2023/9/23
//   cindy.chang@dsp.im (Cindy Chang), 2024/5/30
/** @module timeUtil Time-related utility functions. */

/**
 * Returns a promise that resolves after the specified number of seconds.
 * @param {number} [s=2.5] - The delay in seconds.
 * @returns {Promise<void>} A promise that resolves after the delay.
 */
export const delaySecond = (s = 2.5) => {
  return new Promise((resolve) => setTimeout(resolve, s * 1000));
};
