MCPcopy Create free account
hub / github.com/Effect-TS/effect / Milliseconds

Class Milliseconds

packages/effect/src/cli/Prompt.ts:2050–2067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2048}
2049
2050class Milliseconds extends DatePart {
2051 increment(): void {
2052 this.date.setMilliseconds(this.date.getMilliseconds() + 1)
2053 }
2054
2055 decrement(): void {
2056 this.date.setMilliseconds(this.date.getMilliseconds() - 1)
2057 }
2058
2059 setValue(value: string): void {
2060 this.date.setMilliseconds(globalThis.Number.parseInt(value.slice(-this.token.length)))
2061 }
2062
2063 override toString() {
2064 const millis = `${this.date.getMilliseconds()}`
2065 return millis.padStart(4, "0").substring(0, this.token.length)
2066 }
2067}
2068
2069class Seconds extends DatePart {
2070 increment(): void {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected