mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-12 23:51:02 +00:00
Added ago timers
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { Milliseconds } from './types';
|
||||
import { Milliseconds, Timestamp } from './types';
|
||||
|
||||
/**
|
||||
* PhantomData akin to Rust, because sometimes you need to be smarter than
|
||||
* the compiler.
|
||||
*/
|
||||
export abstract class PhantomData<P> { private __PHANTOM__: P }
|
||||
export abstract class PhantomData<P> { public __PHANTOM__: P }
|
||||
|
||||
/**
|
||||
* Opaque type, similar to `opaque type` in Flow, or new types in Rust/C.
|
||||
@@ -31,3 +31,5 @@ export function sleep(time: Milliseconds): Promise<void> {
|
||||
setTimeout(() => resolve(), time);
|
||||
});
|
||||
}
|
||||
|
||||
export const timestamp = Date.now as () => Timestamp;
|
||||
|
||||
Reference in New Issue
Block a user