mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 10:40:46 +08:00
Unify dark UI surfaces and add adjustable topology canvas background.
Lazy-load module routes, restyle remaining light cards/modals/sidebars, and let canvas background be tuned from the display menu. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
254c50a2c0
commit
3e7bfdb8e9
6 changed files with 722 additions and 344 deletions
|
|
@ -97,10 +97,11 @@ def _windows_cpu_utility_pdh(sample_sec: float = 0.25) -> float | None:
|
|||
_PDH_COUNTER = h_counter
|
||||
_PDH_PRIMED = False
|
||||
|
||||
# After prime, CollectQueryData alone is enough (matches Task Manager Utility).
|
||||
if pdh.PdhCollectQueryData(_PDH_QUERY) != 0:
|
||||
return _PDH_LAST
|
||||
if not _PDH_PRIMED:
|
||||
time.sleep(max(0.05, float(sample_sec)))
|
||||
time.sleep(max(0.05, min(0.15, float(sample_sec))))
|
||||
if pdh.PdhCollectQueryData(_PDH_QUERY) != 0:
|
||||
return _PDH_LAST
|
||||
_PDH_PRIMED = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue