INNER CODE UNIT · TypeScript
seconds
openai/codex-security · github-action/src/main.ts:43
const seconds = Math.floor((performance.now() - started) / 1000);
return `${Math.floor(seconds / 60)}m ${seconds % 60}s`;
}
function heartbeat(label: string, started: number): NodeJS.Timeout {
const timer = setInterval(() => core.info(`${label} is still running; elapsed: ${elapsed(started)}.`), 30_000);
timer.unref();
return timer;
}
export async function runAction(actionRoot: string, overrides: Partial<Dependencies> = {}): Promise<void> {
const deps = {setupRuntime, runProcess, cleanupRuntime, ...overrides};
let inputs: Inputs | undefined;
let target: Target | undefined;
let runtime: Runtime | undefined;
let tempRoot = '';
let success = false;
let finalSummary = '';
let finalTitle = 'Scan could not complete.';