<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sardine</author_name>
  <author_url>https://blog.hatena.ne.jp/sardine/</author_url>
  <blog_title>toyfish.blog</blog_title>
  <blog_url>https://www.toyfish.blog/</blog_url>
  <categories>
    <anon>prog</anon>
  </categories>
  <description>Java で一定時間ごとに何かを行いたい場合、java.util.Timer か java.util.concurrent.ScheduledThreadPoolExecutor のいずれかで、scheduleAtFixedRate() メソッドを使う。 後者の方が新しい API で機能的に充実しているんだけど、ある環境で試したら「指定した間隔できちんと実行してくれない」という現象が起きた。例えば毎分 0 秒丁度になった直後に動かそうとした時に、一見 1 分おきに動いているように見えるんだけど、実は間隔が微妙に長かったり短かったりした。どちらの場合も、長く動かしっぱなしにしていると、少しずつ時…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.toyfish.blog%2Fentry%2F20091223%2Fp1&quot; title=&quot; Java: scheduleAtFixedRate() の正確さ - toyfish.blog&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-12-23 00:00:00</published>
  <title> Java: scheduleAtFixedRate() の正確さ</title>
  <type>rich</type>
  <url>https://www.toyfish.blog/entry/20091223/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
