Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/vcl/osx/     Datei vom 5.10.2025 mit Größe 2 kB image not shown  

Quelle  file_promise_and_timeout_ordering.js  Sprache: JAVA


var log = [];
var resolvedPromise = Promise.resolve(null);
function schedulePromiseTask(f) {
  resolvedPromise.then(f);
}

setTimeout(function () {
  log.push("t1start");
  schedulePromiseTask(function () {
    log.push("promise");
  });
  log.push("t1end");
}, 10);

setTimeout(function () {
  log.push("t2");
  postMessage(log.join(", "));
}, 10);

Messung
CHZG
8010010093

¤ Dauer der Verarbeitung: 0.39 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*© Formatika GbR, Deutschland