Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
const timeout = 2000
const interval = 1000
+/**
+ * @param timeoutMs
+ */
+function dummyTimeoutBusyWait (timeoutMs) {
+ const timeoutTimestampMs = Date.now() + timeoutMs
+ do {} while (Date.now() < timeoutTimestampMs)
+}
+
/**
* @param timeoutMs
*/
}
suite
+ .add('dummyTimeoutBusyWait', function () {
+ dummyTimeoutBusyWait(timeout)
+ })
.add('sleepTimeoutBusyWait', async function () {
sleepTimeoutBusyWait(timeout)
})