fix(battery): Better safety checks

This commit is contained in:
Michael Carlberg 2016-05-31 15:40:17 +02:00
parent b89536af2b
commit 260519ec55

View File

@ -67,7 +67,10 @@ void BatteryModule::subthread_runner()
{
std::this_thread::yield();
const auto dur = std::chrono::duration<double>(
std::chrono::duration<double> dur = 1s;
if (this->animation_charging)
dur = std::chrono::duration<double>(
float(this->animation_charging->get_framerate()) / 1000.0f);
int i = 0;