There might be situations where we might be asked to pass time as TimeSpan rather than in Milliseconds.
Let us see how to do that…
Timespan.FromMilliseconds(int milliseconds)
Example
Implementation using UiPath :
Let us convert 3000 Milliseconds to TimeSpan i.e. 00:00:03
Step 1:
Drag a “Delay” activity into the design panel
Step 2:
Type the above code with 3000 in it into the “Duration” property of Delay activity.
i.e. Timespan.FromMilliseconds(300)
Click here to download the Source Code…
Hope it has helped you…