<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>zvub</author_name>
  <author_url>https://blog.hatena.ne.jp/zvub/</author_url>
  <blog_title>private tips</blog_title>
  <blog_url>https://zvub.hateblo.jp/</blog_url>
  <categories>
    <anon>javascript</anon>
  </categories>
  <description>同じく前回の記事で書いたゲーム作成中の事です。 ゲーム内部の処理で、一定時間毎に問題の切り替え、正誤判定等を行いたいと考えていたところ、候補として二つの関数を発見しました。 setInterval と setTimeout です。 使ったり調べたりしている内に細かい挙動の違いが気になったのでメモとして。 両者とも基本的にループ処理に用いられる事が多い点などでは同じです。 簡単な相違点を見てみましょう。 setInterval の場合 大きな特徴としては、スタックやランタイムを考慮せずに指定時間毎に処理を行うという点です。 つまり、以下の画像内のコメントのような状態が起こり得る事になります。 こ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzvub.hateblo.jp%2Fentry%2F2015%2F01%2F08%2F160130&quot; title=&quot;javascript でのタイマー処理について (setInterval,setTimeout) - private tips&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://cdn-ak.f.st-hatena.com/images/fotolife/z/zvub/20150108/20150108124958.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-01-08 16:01:30</published>
  <title>javascript でのタイマー処理について (setInterval,setTimeout)</title>
  <type>rich</type>
  <url>https://zvub.hateblo.jp/entry/2015/01/08/160130</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
