As always, the finger-made Android-Java, stumped out of the blue. What methods I did not try, what prayers and what saints I didn’t say, but I can’t solve an elementary task:
there is a long X1, X2 ... XN (time in milliseconds); there is their sum: X_sum.
How to get the values of Y1, Y2 ... YN, where Yi = Xi / X_sum,
at the same time, the Yi format is 23.4%, and the sum of all Yi would be 100.0%, and not plus / minus a few percent, and the greater the number of Yi, the further the result from 100.0%. Rounding up the rules, as we were taught in school.
http://dolbodub.blogspot.com/2014/04/java.html
. While unanswered. - St-St