How does QGroundControl calculate the remaining time of the batteries?

I’m using a battery with our custom BMS solution which communicates with the flight controller via droneCAN. We have noticed that although the voltage, current, SOC, SOH all display correct values, the remaining flight time is always incorrect. It shows impractical values such as 36-40HRS of remaining flight time.
I would like to know how does QGC calculate this flight time, as I’m not sending any such parameter from the BMS.