getElapsedTimeInHours static method
Implementation
static double getElapsedTimeInHours() {
final timestamp = Pref.get('installation_time', 0);
if (timestamp == 0) {
return 0;
}
final now = DateTime.now().millisecondsSinceEpoch;
final elapsedTime = (now - timestamp) / 1000 / 60 / 60;
return double.parse(elapsedTime.toStringAsFixed(2));
}