ohmu
·
2026-10-15
1#pragma once
2
3#include "fastfetch.h"
4#include "modules/top/option.h"
5
6typedef struct FFTopProcessResult {
7 FFstrbuf name;
8 double cpuPercent;
9 uint64_t memBytes;
10 uint64_t bytesRead;
11 uint64_t bytesWritten;
12 uint64_t startTime;
13 uint32_t threads;
14 uint32_t pid;
15} FFTopProcessResult;
16
17typedef struct FFTopProcessSnapshot {
18 FFstrbuf name; // comm
19 uint64_t cpuTime; // user_time + system_time
20 uint64_t memBytes; // RSS
21 uint64_t bytesRead; // Physical storage read
22 uint64_t bytesWritten; // Physical storage written
23 uint64_t startTime; // Differs between platforms
24 uint32_t threads;
25 uint32_t pid;
26} FFTopProcessSnapshot;
27
28const char* ffDetectTopProcesses(FFTopOptions* options, FFlist* result);
29const char* ffTopGetProcessSnapshot(FFlist* snapshots, FFTopTypes showTypes);