summaryrefslogtreecommitdiff
path: root/tests/specs/bench/finally_timeout/finally_timeout.ts
blob: c49eb8da246d4d611ce140b3b6217c0172eb25c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
Deno.bench("error", function () {
  const timer = setTimeout(() => null, 10000);
  try {
    throw new Error("fail");
  } finally {
    clearTimeout(timer);
  }
});

Deno.bench("success", function () {
});