@toreda/time
Version:
Simple, small footprint library for common time operations and converting between units of time.
9 lines (8 loc) • 323 B
TypeScript
import type { Time } from '../time';
import type { TimeUnit } from './unit';
/**
* Create a Time snapshot of the current system clock in `units`
* (defaults to seconds). The returned Time holds a frozen value
* captured at call time and does not auto-update.
*/
export declare function timeNow(units?: TimeUnit): Time;