Libraryless. Click here for Pure Java version (5128L/34K).
1 | !7 |
2 | |
3 | sclass JavaCPUPercentage extends DynBigNumber { |
4 | transient O cpuMonitor; |
5 | |
6 | start { |
7 | setDescription("JAVA CPU %"); |
8 | setToolTip("Percentage is per core"); |
9 | cpuMonitor = runDependent(#1001405); |
10 | ownTimer(doEvery(2.0, r actualUpdate)); |
11 | } |
12 | |
13 | void actualUpdate { |
14 | setValue(iceil((double) call(cpuMonitor, 'getInProcessCPU)) + " %"); |
15 | } |
16 | } |
Began life as a copy of #1016643
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016652 |
Snippet name: | Java CPU % [Dyn Module] |
Eternal ID of this version: | #1016652/8 |
Text MD5: | 4919b257bf8ddc40e324192feb0ca43f |
Transpilation MD5: | 173dfbfb10d8cb319efd0d1d8c57b4b4 |
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-06 02:38:01 |
Source code size: | 374 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 367 / 152792 |
Version history: | 7 change(s) |
Referenced in: | [show references] |