Gamepad.timestamp
特性为
Gamepad
interface returns a
DOMHighResTimeStamp
representing the last time the data for this gamepad was updated.
The idea behind this is to allow developers to determine if the
axes
and
button
data have been updated from the hardware. The value must be relative to the
navigationStart
属性在
interface. Values are monotonically increasing, meaning that they can be compared to determine the ordering of updates, as newer values will always be greater than or equal to older values.
PerformanceTiming
注意 : This property is not currently supported anywhere.
readonly attribute DOMHighResTimeStamp timestamp;
var gp = navigator.getGamepads()[0]; console.log(gp.timestamp);
| 规范 | 状态 | 注释 |
|---|---|---|
|
Gamepad
The definition of 'Gamepad.timestamp' in that specification. |
工作草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
timestamp
|
Chrome
35
|
Edge 12 |
Firefox
29
|
IE No |
Opera
22
|
Safari 10.1 | WebView Android No |
Chrome Android
35
|
Firefox Android 32 |
Opera Android
22
|
Safari iOS 10.3 |
Samsung Internet Android
4.0
|
完整支持
不支持
用户必须明确启用此特征。
要求使用供应商前缀或不同名称。