Documentation for method at

Documentation for method at, assembled from the following types:

class Promise

From Promise

(Promise) method at

method at(Promise:U: $time:$scheduler = $*SCHEDULER --> Promise:D)

Creates a new Promise that will be kept at the given time, or later.

my $p = Promise.at(now + 2).then({ say "2 seconds later" });
# do other stuff here 
 
await $p;   # wait here until the 2 seconds are over