 unsigned long hours = 0;
 unsigned long lcd_timer = 0;
 unsigned long lcd_timeout = 20;
+unsigned long dischargeStart = 0;
+unsigned long dischargeElapsed = 0;
+unsigned long lastMeassureTime = 0;
+unsigned int mAh = 0;
 
 unsigned long getTime()
 {

    if( charging || discharging )
    {
        current_mA = ina219.getCurrent_mA();
    }
    else
    {

        sprintf(line2, "%16s", str_volt);
        break;
    case MODE_DISCHARGE:
        {
            if(discharging || discharged)
            {
                sprintf(line1, "D:  %8s mAh", str_mAh);
            }
            else
            {
                sprintf(line1, "%16s", "DISCHARGE");
            }
        }
        if( discharged )
            sprintf(line2, "%6s  FINISHED", str_volt);
        else
            sprintf(line2, "%6s %6s mA", str_volt, str_mA);
        break;
    case MODE_SERIAL_MON:
        sprintf(line1, "%16s", serial_buf2);
