Libraryless. Click here for Pure Java version (5102L/34K).
1 | !7 |
2 | |
3 | sclass SystemCPUPercentage extends DynBigNumber {
|
4 | void start {
|
5 | super.start(); |
6 | setDescription("SYSTEM CPU %");
|
7 | setToolTip("Percentage is per core (max=" + numberOfCores()*100 + "%)");
|
8 | ownTimer(doEvery(2.0, r actualUpdate)); |
9 | } |
10 | |
11 | void actualUpdate {
|
12 | setValue(toIntPercent_ceil(systemCPULoad()*numberOfCores()) + " %"); |
13 | } |
14 | } |
Began life as a copy of #1018523
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1018526 |
| Snippet name: | System CPU % [Dyn Module] |
| Eternal ID of this version: | #1018526/6 |
| Text MD5: | 9907fa593b1e8111bae1aa16c1ee4e7e |
| Transpilation MD5: | 524e6515ff9504e7ad998b4b009ff5b3 |
| Author: | stefan |
| Category: | javax / modules |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-10-03 11:48:08 |
| Source code size: | 365 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 806 / 17806 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |