<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Sat, 13 Jun 2026 16:22:30 +0000</lastBuildDate>
    <item>
      <title>(JavaScript) Exact Javascript Timeout - McSodbrenner</title>
      <link>https://snipplr.com/view/69951/exact-javascript-timeout</link>
      <description>&lt;p&gt;This is a more precise version of the native setTimeout(). It uses the same parameters as setTimeout, but adds a third parameter "resolution" which defines how often (in ms) to check for the time that passed.&#13;
&#13;
    // alert after 5 seconds with an inaccuracy of 20 milliseconds&#13;
    var timeout = setExactTimeout(function(){&#13;
       alert('done');&#13;
    }, 5000, 20);&#13;
&#13;
    // comment out to show "done"&#13;
    clearExactTimeout(timeout);&lt;/p&gt;</description>
      <pubDate>Fri, 15 Feb 2013 19:36:00 UTC</pubDate>
      <guid>https://snipplr.com/view/69951/exact-javascript-timeout</guid>
    </item>
  </channel>
</rss>
