function waitForTime(time){
var t1 = new GlideDateTime().getNumericValue();
var t2 = new GlideDateTime().getNumericValue();
var duration = t2 - t1;
while(duration < time){
t2 = new GlideDateTime().getNumericValue();
duration = t2 - t1;
}