Look at how the variable values.t_roundstart is used throughout those trials. It is (re-)set to zero at the start of a new round
<trial newround>
/ ontrialbegin = [values.t_roundstart=0; ...]
and in case of the subject re-setting the current problem
<trial resetround>
[...]
/ ontrialbegin = [values.t_roundstart=0; ...]
The first instance of <trial choice> then stores the current time in it
<trial choice>
[...]
/ ontrialbegin = [if(values.choicecount==1)values.t_roundstart=script.elapsedtime]
To determine absolute solution for a given problem (i.e., across all attempts) you could simply introduce a variable that records the current time *only at the beginning of a new round* (i.e., it is never reset between attempts) and is only updated in the *very first 'choice' trial* (i.e., you'll want to implement something like values.totalchoicecount, which also is not reset between attempts).
The rest should follow logically from there, but let me know if not.