Jenkins pipeline job: Set sleep time from a string parameter?

small improve for this page:

You also can use sleep(time:3,unit:"SECONDS") if you are interested in specifying time unit of your sleep

https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#sleep-sleep


Finally I did found a way to get this work:

stage ("wait_prior_starting_smoke_testing") {
    def time = params.SLEEP_TIME_IN_SECONDS
    echo "Waiting ${SLEEP_TIME_IN_SECONDS} seconds for deployment to complete prior starting smoke testing"
    sleep time.toInteger() // seconds
}