pause a variable time

How can I pause a variable time?

e.g I have a scenario that each user will do something together after 10 minutes since first started. So each user will compare its time to the very start time and pause accordingly. But seems like pause does not support that?

.exec(session =>{
var time = common.Common.compareStartTime
var diffTime = waitTime - time
println(diffTime )
session.setAttribute(“waitTime”, diffTime)


Yes it does, but it expects a Duration, not an Int (or Long).

Moreover, you don’t have to first store in the session:

.pause(session => {
var diffTime = waitTime - common.Common.compareStartTime