I'm trying to calculate the runtime by subtracting "start" with "end" in Groovy, but I am not sure how to perform the mathematical calculation as I have derived the start and end time using the bash command (date in milliseconds). Here is the sample:
@Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='1.1.0')
import wslite.soap.*
import wslite.http.auth.*
import java.util.regex.*
import groovy.xml.*
import groovy.util.*
import java.lang.*
Process start = 'date +%s%N'.execute()
.....
SOAP request and response
.....
Process end = 'date +%s%N'.execute()
Now I'm looking something like below, but giving me HTTP 500 error :
Process runtime = '$((end-start))'.execute()
println runtime.text