Skip to content

Commit

Permalink
Memory Monitor: Change else ifs to ifs (#516)
Browse files Browse the repository at this point in the history
* library: Add Memory Monitor entry

* Update main.json

* Update main.blp

* Memory Monitor: Suggestions

* Memory Monitor: Change else ifs to ifs
  • Loading branch information
AkshayWarrier authored Aug 20, 2023
1 parent 2fc619f commit 5a2840e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Library/demos/Memory Monitor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ memory_monitor.connect("low-memory-warning", (monitor, level) => {
// Processes should free up unneeded resources
console.log("Warning Level: Low");
drop_caches();
} else if (level >= Gio.MemoryMonitorWarningLevel.MEDIUM) {
}
if (level >= Gio.MemoryMonitorWarningLevel.MEDIUM) {
// Processes should try harder to free up unneeded resources
console.log("Warning Level: Medium");
} else if (level >= Gio.MemoryMonitorWarningLevel.CRITICAL) {
}
if (level >= Gio.MemoryMonitorWarningLevel.CRITICAL) {
// system will start terminating processes to reclaim memory
console.log("Warning Level: Critical");
}
Expand Down

0 comments on commit 5a2840e

Please sign in to comment.