pitboard-core 0.15.0

The engine behind Pitboard: switches Claude Code, Codex and Claude Desktop between accounts by parking and restoring their logins. Its API serves Pitboard's own front ends.
Documentation
//! What macOS and Linux do the same way, because both are POSIX: modes, signals, the
//! passwd database, a login shell, and a service manager asked from the command line.

#[allow(
    clippy::disallowed_methods,
    reason = "the face every file and folder Pitboard makes is made through"
)]
pub(crate) mod fs;
pub(crate) mod proc;
pub(crate) mod service;
pub(crate) mod shell;
pub(crate) mod user;

// Instant reads CLOCK_UPTIME_RAW on macOS and CLOCK_MONOTONIC on Linux, and neither counts a
// sleep (macOS's clock_gettime(3), Linux man-pages 6.19).
pub(super) fn awake() -> std::time::Duration {
    static SINCE: std::sync::OnceLock<std::time::Instant> = std::sync::OnceLock::new();
    SINCE.get_or_init(std::time::Instant::now).elapsed()
}