// Minimal signal handling demo (Node.js-like pseudo)
process.on('SIGINT', () => {
console.log('Caught SIGINT, shutting down cleanly');
});
// Periodic timer with setInterval (conceptual)
const id = setInterval(() => { /* do work */ }, 10);
// In POSIX, ITIMER_REAL would deliver SIGALRM; use signalfd to consume safely.
// Rough latency model (ns)
function switchCost(regs=1000, tlb=2000, cache=5000){
return regs + tlb + cache; // illustrative only
}