MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / aNow

Function aNow

src/pkg/utils/utils.ts:19–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 * 用 aNow 取得的现在时间能保证严格递增
18 */
19export const aNow = () => {
20 let now = Date.now();
21 if (prevNow >= now) now = prevNow + 0.0009765625; // 2^-10
22 prevNow = now;
23 return now;
24};
25
26export type Deferred<T> = {
27 promise: Promise<T>;

Callers 1

utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected