mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 02:35:42 +00:00
fix(Map): Trying to fix problem with fast forwarding after page are inactive some time.
This commit is contained in:
11
assets/js/hooks/Mapper/helpers/getFormattedTime.ts
Normal file
11
assets/js/hooks/Mapper/helpers/getFormattedTime.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export function getFormattedTime() {
|
||||
const now = new Date();
|
||||
|
||||
const hours = String(now.getHours()).padStart(2, '0');
|
||||
const minutes = String(now.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(now.getSeconds()).padStart(2, '0');
|
||||
|
||||
const ms = String(now.getMilliseconds() + 1000).slice(1);
|
||||
|
||||
return `${hours}:${minutes}:${seconds} ${ms}`;
|
||||
}
|
||||
Reference in New Issue
Block a user