Pebble App Framework: Phone API
    Preparing search index...

    Function allowance

    • How many of the calls asked for fit inside a provider's plan now.

      Each limit is read on its own, and the room is what the tightest leaves. When some calls do not fit, the wait is for the last limit to open, so every call asked for fits once it is up. A paid plan has nothing counted, and the provider's own RATE LIMIT answers set its waits. A weight that is not a number above 0 gets no room, and a wait of the plan's longest window, as a call no plan can fit.

      Parameters

      • plan: QuotaPlan

        The provider's plan.

      • stamps: readonly Stamp[]

        The calls already sent to it, as keepStamps returns them.

      • ask: Ask

        The calls the round wants to send.

      • nowMs: number

        Now, in epoch milliseconds.

      Returns Allowance

      How many fit now, and when the rest would.