Throttler icon indicating copy to clipboard operation
Throttler copied to clipboard

Throttle runs first request with a delay

Open freefelt opened this issue 3 months ago • 0 comments

I set throttle for every 3 seconds, but have a delay for 3 seconds for the first request. Was it intended that way?

        print("\(Date().toString(format: "HH:mm:ss")): Begin")
        for i in 1...10000 {
            throttle(.seconds(3)) {
                print("\(Date().toString(format: "HH:mm:ss")): throttle: \(i)")
            }
        }

Screenshot 2024-03-13 at 11 01 51

freefelt avatar Mar 13 '24 06:03 freefelt