Uses 6315K of libraries. Click here for Pure Java version (4218L/21K).
1 | !7 |
2 | |
3 | cmodule BatteryStatus > DynBigNumber {
|
4 | start {
|
5 | setDescription("BATTERY STATUS");
|
6 | ownTimer(doEveryAndNow(10000, r actualUpdate)); |
7 | } |
8 | |
9 | void actualUpdate {
|
10 | //time "Battery" { // <10 ms on Windows, up to 100 ms on Linux
|
11 | S value = "-"; |
12 | double level = oshi_batteryLevel_withZeroPercentFix(); |
13 | if (!isNaN(level)) value = iround(level) + " %"; |
14 | setValue(value); |
15 | dm_setModuleName("Battery: " + value);
|
16 | //} |
17 | } |
18 | } |
Began life as a copy of #1015915
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1016136 |
| Snippet name: | Battery Status [Dyn Module] |
| Eternal ID of this version: | #1016136/9 |
| Text MD5: | 1b8e3f75a3136e471ea945431660be09 |
| Transpilation MD5: | 8b88c9101ca82fc2cb82e01b45b829dc |
| Author: | stefan |
| Category: | javax / modules |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-12-17 13:32:24 |
| Source code size: | 474 bytes / 18 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 848 / 16107 |
| Version history: | 8 change(s) |
| Referenced in: | [show references] |