From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/gamepad/timestamp/index.html | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 files/ja/web/api/gamepad/timestamp/index.html (limited to 'files/ja/web/api/gamepad/timestamp') diff --git a/files/ja/web/api/gamepad/timestamp/index.html b/files/ja/web/api/gamepad/timestamp/index.html new file mode 100644 index 0000000000..6f7aeaba05 --- /dev/null +++ b/files/ja/web/api/gamepad/timestamp/index.html @@ -0,0 +1,61 @@ +--- +title: Gamepad.timestamp +slug: Web/API/Gamepad/timestamp +tags: + - API + - Gamepad API + - Games + - NeedsBetterSpecLink + - NeedsMarkupWork + - Property + - Reference + - Référence(2) +translation_of: Web/API/Gamepad/timestamp +--- +
{{APIRef("Gamepad API")}}
+ +

{{domxref("Gamepad")}} インターフェースの Gamepad.timestamp プロパティは、このゲームパッドのデータが最後に更新された時刻を表す {{domxref("DOMHighResTimeStamp")}} を返します。

+ +

このプロパティの背景にある考え方は、ハードウェアにより axes や button のデータが更新されたかどうかを開発者が判断できるようにすることです。このプロパティの値は {{domxref("PerformanceTiming")}} インターフェースの navigationStart 属性との相対的な値になります。値は単調増加しています。つまり、新しい値は常に古い値以上であるため、新旧の値を比較することでデータの更新を判断できます。

+ +
+

注釈: このプロパティは現在サポートされていない環境があります。

+
+ +

構文

+ +
readonly    attribute DOMHighResTimeStamp timestamp;
+ +

+ +
var gp = navigator.getGamepads()[0];
+console.log(gp.timestamp);
+ +

+ +

{{domxref("DOMHighResTimeStamp")}} 。

+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName("Gamepad", "#dom-gamepad-timestamp", "Gamepad.timestamp")}}{{Spec2("Gamepad")}}初版
+ +

ブラウザの互換性

+ +

{{Compat("api.Gamepad.timestamp")}}

+ +

参照

+ +

ゲームパッド API の使用

-- cgit v1.2.3-54-g00ecf