Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 09:08 AM
You can use below code for sleep function
- /* time is in milliseconds - this is essentially a "sleep" function */
- wait: function(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;
- }
- },
from here: gs.sleep() in scoped application?
Regards,
Sachin