feat: add markdown module header and async bash execution result structs

Introduce `include/markdown.h` with retoor copyright header and add `r_process_result_t` struct plus `r_bash_execute_ext` / `r_process_result_free` declarations to `include/bash_executor.h` for advanced async process handling.
This commit is contained in:
2026-01-29 05:54:10 +00:00
parent 8215d7012d
commit dccd79c05a
98 changed files with 6682 additions and 817 deletions
+18
View File
@@ -0,0 +1,18 @@
import psutil
import time
LOG_FILE = 'usage.log'
INTERVAL = 5 # seconds
try:
with open(LOG_FILE, 'a') as log:
while True:
cpu_percent = psutil.cpu_percent(interval=1)
mem = psutil.virtual_memory()
log_entry = f"CPU: {cpu_percent}%, Memory: {mem.percent}%\n"
log.write(log_entry)
log.flush()
print(log_entry.strip())
time.sleep(INTERVAL - 1)
except KeyboardInterrupt:
print('Monitoring stopped by user.')