@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
19 lines • 1.02 kB
TypeScript
export { PROCESS_START_TOLERANCE_MS, sameProcessStartMs as sameProcessStart, } from "../../../../utils/process-identity.ts";
/**
* Two boot instants further apart than this belong to different boots. `os.uptime()` is
* integral seconds on every platform, and a laptop's sleep is accounted in uptime, so the
* only drift left is sub-second rounding on either side.
*/
export declare const BOOT_INSTANT_TOLERANCE_MS = 120000;
export declare function processBootAtMs(now?: () => number): number;
/** Floored like `ps -o lstart`, which truncates to the second: rounding up could land after now. */
export declare function ownProcessStartedAtMs(now?: () => number): number;
export declare function sameBoot(bootAtMs: number, otherBootAtMs: number | undefined): boolean;
export interface ChildProcessIdentity {
readonly pid: number;
readonly processGroupId?: number;
readonly startedAtMs: number;
readonly bootAtMs: number;
readonly argv: readonly string[];
}
//# sourceMappingURL=process-identity.d.ts.map