mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-04 20:01:54 +00:00
[constants] Refactor 1000 to MS_PER_SECOND
- Extracted MS_PER_SECOND to src/constants.mjs - Replaced literal 1000 in src/relay-health.mjs, src/utils.mjs, src/lib.mjs, src/lock-ops.mjs - Updated test/scheduler-lock-failure-schema.contract.test.mjs to copy constants.mjs - Added task log and artifacts Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
510e05ab54
commit
2174e8bc4d
11 files changed
+54
-9
No files matched your search
+2
-1
@@ -1,11 +1,12 @@
|
||||
import fs from 'node:fs';
|
||||
import { MS_PER_SECOND } from './constants.mjs';
|
||||
|
||||
export function todayDateStr() {
|
||||
return new Date().toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
export function nowUnix() {
|
||||
return Math.floor(Date.now() / 1000);
|
||||
return Math.floor(Date.now() / MS_PER_SECOND);
|
||||
}
|
||||
|
||||
export function getIsoWeekStr(dateInput) {
|
||||
|
||||
Reference in new issue
Block a user