<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>iikagenlabo</author_name>
  <author_url>https://blog.hatena.ne.jp/iikagenlabo/</author_url>
  <blog_title>iikagenlabo</blog_title>
  <blog_url>https://iikagenlabo.hatenablog.com/</blog_url>
  <categories>
    <anon>M5Stack</anon>
  </categories>
  <description>NTPで時刻合わせをしたら、指定時刻になったら何かを処理させたいところですよね。 前回紹介したLocalClockクラスを使えば、checkTime()メソッドで指定時刻になったかどうかが調べられます。 指定時刻になったかどうかを調べるには、一定間隔で時刻を取得して過ぎているかどうかで分かります。 処理自体は簡単ですが、時間表現が関数によってちがい地味にめんどくさかったので紹介します。 まず、時間の差分を求めるにはtime.hにあるdifftime()という関数を使います。 これはtime_tを引数に取り、時間差を秒単位のdouble型で返します。 double difftime(time_t…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiikagenlabo.hatenablog.com%2Fentry%2F2019%2F07%2F16%2F005208&quot; title=&quot;M5Stackで指定時刻を過ぎたか調べる - iikagenlabo&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>2019-07-16 00:52:08</published>
  <title>M5Stackで指定時刻を過ぎたか調べる</title>
  <type>rich</type>
  <url>https://iikagenlabo.hatenablog.com/entry/2019/07/16/005208</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
