I don't know exactly how it is calculated.
But: While working for drums, I invented the multiplication formula with six

If I want 2 seconds, I multiply by six and write 12.
I think that in other cases (depending on the parameters used) this multiplication can change. (2,3,4,5,...,10)
All right, after I did some digging on the internet, I found this paragraph:
"SoundFonts use unusual envelope timings. The Sustain parameter has an effect on the Decay time (the absolute amount of time it takes to get from 100% amplitude to the Sustain level) and the Release time (the absolute amount of time it takes to get from the Sustain level to zero amplitude). For example, if the Sustain parameter is 50%, then it will take 50% of the time stipulated by both the Decay and Release. If the Sustain parameter is 70%, then it will take 30% of the time stipulated by the Decay, and 70 % of the Release time."
source:
www.chickensys.com/support/software/tran...ndfont/kurzweil.html