{{APIRef("High Resolution Time")}}
The DOMHighResTimeStamp
type is a double
and is used to store a time value. The value could be a discrete point in time or the difference in time between two discrete points in time. The unit is milliseconds and should be accurate to 5 µs (microseconds). However, if the browser is unable to provide a time value accurate to 5 microseconds (because, for example, due to hardware or software constraints), the browser can represent a the value as a time in milliseconds accurate to a millisecond.
Implementations that cannot get the required precision (for example, if the underlying system doesn't support it) are allowed to only be accurate to one millisecond.
Properties
This type has no properties.
Methods
This type has no methods.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Highres Time Level 2', '#dom-domhighrestimestamp', 'DOMHighResTimeStamp')}} | {{Spec2('Highres Time Level 2')}} | Stricter definitions of interfaces and types. |
{{SpecName('Highres Time', '#sec-DOMHighResTimeStamp', 'DOMHighResTimeStamp')}} | {{Spec2('Highres Time')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 6 | {{CompatGeckoDesktop("7.0")}} | 9 | 15.0 | 8 |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile("15.0")}} | 9 | 15.0 | 9 |