Documentation for method at
assembled from the following pages:
Class: Promise §
From Promise
(Promise) method at §
method at(Promise: , : = --> Promise)
Creates a new Promise
that will be kept $at
the given time—which is given as an Instant or equivalent Numeric—or as soon as possible after it.
my = Promise.at(now + 2).then();# do other stuff here await ; # wait here until the 2 seconds are over
If the given time is in the past, it will be treated as now (i.e. keeping the returned Promise right away).
Please note that situations like these are often more clearly handled with a react and whenever block.