# runtime **Repository Path**: rippleos/runtime ## Basic Information - **Project Name**: runtime - **Description**: MOSS 运行时库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-11 - **Last Updated**: 2026-05-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mruntime Runtime foundation library for MOSS project, providing process priority management, CPU core affinity, and time acquisition features. ## Features - Process priority management (nice value) - CPU core affinity binding - System uptime measurement (nanoseconds/microseconds) - Epoch-based timestamp (milliseconds) - High-precision sleep functions ## Architecture - `Runtime` - Main entry point with configuration - `Process` - Process-level management (priority, CPU affinity) - `Clock` - Time acquisition and sleep functions ## Usage ```cpp #include int main() { mruntime::Runtime::Config config; config.priority = -10; config.cpu_affinity = {0, 1, 2, 3}; auto runtime = mruntime::Runtime::create(config); // Use clock uint64_t uptime = mruntime::Clock::uptime_ns(); mruntime::Clock::sleep_ms(100); return 0; } ``` ## Build ```bash mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release make ```