Public Member Functions | |
| CpuThrottle (double target_pct=2.0, int check_interval_ms=1000) | |
| void | enforce () |
Static Private Member Functions | |
| static long | hertz_total () |
Private Attributes | |
| CpuSnapshot | prev |
| unsigned long long | prev_total = 0 |
| double | target |
| int | interval_ms |
Definition at line 200 of file BastionGuard-ransomware-scanner.cpp.
|
inline |
Definition at line 202 of file BastionGuard-ransomware-scanner.cpp.
References interval_ms, now_ms(), prev, prev_total, CpuSnapshot::proc_time, read_proc_self(), read_proc_stat(), target, and CpuSnapshot::ts_ms.
|
inline |
Definition at line 211 of file BastionGuard-ransomware-scanner.cpp.
References hertz_total(), interval_ms, now_ms(), prev, prev_total, CpuSnapshot::proc_time, read_proc_self(), read_proc_stat(), target, and CpuSnapshot::ts_ms.
Referenced by main().
|
inlinestaticprivate |
Definition at line 247 of file BastionGuard-ransomware-scanner.cpp.
Referenced by enforce().
|
private |
Definition at line 245 of file BastionGuard-ransomware-scanner.cpp.
Referenced by CpuThrottle(), and enforce().
|
private |
Definition at line 242 of file BastionGuard-ransomware-scanner.cpp.
Referenced by CpuThrottle(), and enforce().
|
private |
Definition at line 243 of file BastionGuard-ransomware-scanner.cpp.
Referenced by CpuThrottle(), and enforce().
|
private |
Definition at line 244 of file BastionGuard-ransomware-scanner.cpp.
Referenced by CpuThrottle(), and enforce().