Is there an equivalent for threadDelay
- cohen.avrahamOP
G-d willing
Hello,
In Haskell there is thethreadDelaycommand that suspends the thread for a certain time (in milliseconds).
Is there a function in DAML that achieves the same?Thanks,
- cocreature
There is sleep in Daml script. There is nothing that you can use within a transaction. If that’s your usecase could you explain what you’re trying to do? Note that
getTimewill never advance within a transaction. It’s fixed - cohen.avraham
G-d willing
Hi @cocreature,
I want to have a script that within a loop it creates contracts. And I don’t want them to get created right away, but after some delay in time. It is for testing purposes. - cocreature 1
Then sleep within your Daml script should work fine?