1 Answer
- Newest
- Most votes
- Most comments
0
【以下的回答经过翻译处理】 下面是如何获取当前时代的秒数和毫秒数的方法:
const epoch = new Date('1970-01-01T00:00:00Z'); const currentDate = new Date();
const timestamp_ms = currentDate - epoch; const timestamp = Math.floor(timestamp_ms / 1000);
GameSparks().Logging().Info("Current timestamp, in seconds: " + timestamp);
Relevant content
- Accepted Answerasked 2 months ago
- asked 5 months ago
- asked a year ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 11 days ago
- AWS OFFICIALUpdated 15 days ago