Tyrrrz / LightBulb

Reduces eye strain by adjusting screen gamma based on the current time
MIT License
2.27k stars 141 forks source link

LightBulb uses up too much Cpu #204

Closed Antosser closed 3 years ago

Antosser commented 3 years ago

Version

last

Details

LightBulb uses too much CPU (~3%) and I know to fix this:

This small code in C++ can take up to 30% of the CPU: int main() while (true) {/* some code */}

To fix that you can add a sleep function at the end of it like this: int main() while (true) {/* some code */ Sleep(5);} Now the program is limited to max. 200 cycles/second and will take up around 0.03% of the CPU. I know that LightBulb is written in C# but please do a quick research. Thanks!

Steps to reproduce

  1. Open LightBulb
  2. Done
Tyrrrz commented 3 years ago

Duplicate of #198?