DeviceMotionEvent.interval

  • Revision slug: Web/API/DeviceMotionEvent.interval
  • Revision title: DeviceMotionEvent.interval
  • Revision id: 470813
  • Created:
  • Creator: tregagnon
  • Is current revision? No
  • Comment

Revision Content

{{ DomRef() }}

Summary

Returns the interval, in milliseconds, at which data is obtained from the underlaying hardware. You can use this to determine the granularity of motion events.

Syntax

var interval = instanceOfDeviceMotionEvent.interval;

Specifications

Specification Status Comment
{{SpecName('Device Orientation')}} {{Spec2('Device Orientation')}} Initial specification.

Browser compatibility

{{ page("/en-US/docs/Web/API/DeviceMotionEvent","Browser_compatibility") }}

See also

Revision Source

<p>{{ DomRef() }}</p>
<h2 id="Summary" name="Summary">Summary</h2>
<p>Returns the interval, in milliseconds, at which data is obtained from the underlaying hardware. You can use this to determine the granularity of motion events.</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="eval">
var interval = <em>instanceOfDeviceMotionEvent</em>.interval;
</pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{SpecName('Device Orientation')}}</td>
      <td>{{Spec2('Device Orientation')}}</td>
      <td>Initial specification.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ page("/en-US/docs/Web/API/DeviceMotionEvent","Browser_compatibility") }}</p>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ domxref("DeviceMotionEvent") }}</li>
  <li>{{ event("devicemotion") }}</li>
  <li>{{ domxref("window.ondevicemotion") }}</li>
  <li>{{ event("deviceorientation") }}</li>
  <li>{{ domxref("DeviceOrientationEvent") }}</li>
  <li><a href="/en-US/docs/WebAPI/Detecting_device_orientation" title="/en-US/docs/WebAPI/Detecting_device_orientation">Detecting device orientation</a></li>
  <li><a href="https://developer.mozilla.org/en/DOM/Orientation_and_motion_data_explained" title="Orientation and motion data explained">Orientation and motion data explained</a></li>
</ul>
Revert to this revision