diff options
| author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-04-19 00:16:51 +0800 |
|---|---|---|
| committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-04-19 00:16:51 +0800 |
| commit | 51ae30d794ffd362779b44420c305871d63891ba (patch) | |
| tree | 187bc27fb862a037c5388140a5acefce5455d219 /features/hud | |
| parent | c87c6f2703d689375518f54905ae10e2edb42d41 (diff) | |
| download | SoopyV2-51ae30d794ffd362779b44420c305871d63891ba.tar.gz SoopyV2-51ae30d794ffd362779b44420c305871d63891ba.tar.bz2 SoopyV2-51ae30d794ffd362779b44420c305871d63891ba.zip | |
optimisations to threads
Diffstat (limited to 'features/hud')
| -rw-r--r-- | features/hud/index.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/features/hud/index.js b/features/hud/index.js index 27d12e5..b580908 100644 --- a/features/hud/index.js +++ b/features/hud/index.js @@ -253,12 +253,13 @@ class Hud extends Feature { this.apiLoad(this.FeatureManager.features["dataLoader"].class.lastApiData.skyblock_raw, "skyblock", false, true) } - new Thread(() => { //TODO: dont create this thread if you have the feature disabled - while (this.enabled) { + this.registerStep(false, 5, () => { + if (!this.showSpotifyPlaying.getValue()) return + + new Thread(() => { this.updateSpotify() - Thread.sleep(5000) - } - }).start() + }).start() + }) this.registerActionBar("${m}", this.actionbarMessage) } |
