How do I make sleep in Dyalog APL?

75 views Asked by At

How to implement an analogue of Sleep() function in Dyalog APL?

Task context:

I have a CSV file, and for each line where I call a function, the function makes a network request, and because of their frequency, the server blocks me - I need to pause between each line. But how to implement this pause?

 PAIRS
┌───────┬───────┬────────┐
│BTCUSDT│ETHBTC │ETHUSDT │
├───────┼───────┼────────┤
│BTCUSDT│LTCBTC │LTCUSDT │
├───────┼───────┼────────┤
│BTCUSDT│BNBBTC │BNBUSDT │
├───────┼───────┼────────┤
│BTCUSDT│NEOBTC │NEOUSDT │
├───────┼───────┼────────┤

check_buy_buy_sell ⍤1⊢PAIRS

I tried googling, didn't help.

1

There are 1 answers

1
Adám On BEST ANSWER

Next time, try APLcart instead of Google…

The answer is ⎕DL which takes a number of seconds as argument and sleeps for that time. See the documentation for details.