Function timer

  • Create a Task which will resolve to Unit after a set interval. (Safely wraps setTimeout.)

    This can be combined with the Task.timeout instance method.

    Parameters

    • ms: number

      The number of milliseconds to wait before resolving the Task.

    Returns Timer

    a Task which resolves to the passed-in number of milliseconds.