Create Random Timer Delay


#1

I’m trying to create a random timer between 1 to 60 seconds using new Random().Next(1,60) which works great, but in order to use this in a Delay function it needs to be formatted correctly and struggling to convert the random integer to the required date format.


#2

It should work with this syntax for the delay activity:
Timespan.FromMilliseconds(yourVariable)


#3

It should be TimeSpan.FromSeconds(yourvariable) as @ocnuybear is trying to get delay in seconds!
here is an example:
Dynamic Delay.xaml (5.5 KB)


#4

Thank you guys:grinning: