How does one setup a timer (Start time at the beginning and Stop Timer at the end) to help calculate the elapsed time
2 Likes
jvanmarion
(Jeroen van Marion)
January 20, 2020, 11:44pm
2
What have you tried so far?
shankm
(Shan KM)
January 21, 2020, 1:53am
3
Hi @kaushiks1 ,
If you want to find the elapsed time for the whole process, then it’s already calculated and shown in the logs.
Else if you want to find the elapsed time for a specific part of the process,
Set a Datetime variable startTime before the specificpart, and assign now
*Your Process steps goes here
*After the steps, set another Datetime variable endTime and set now
*Then find the difference between startTime and end Time.
Thx.
2 Likes
Thank you @shankm … appreciate your suggestion. I will try that.
Although I do find it odd that a Start and Stop Timer is not available within UiPath. (its available within .NET so I assumed it would be available within UiPath too)
Thanks once again.
2 Likes
Well this idea is already in consideration.
Vote for it and hopefully when accepted it will be added to UiPath
Hello,
I got this idea while working on some usecases. Also, I know we can record time for any process with codes but still feel the need to have a activity in studio which we can use easily.
Timer activity can have following properties:
Get trigger after it is executed or trigger by any image, element, or some events.
Timer stops after it is executed or trigger by any image, element, or some events.
Time lapse.
Different DateTime and Time formats for output(Optional).
DelayAfter and DelayBe…
I would very much appreciate a “time-out” activity that can encapsulate sequences or flowcharts, so that we can limit how much time a certain part of a process is allowed to take before finishing. On the bottom of the activity there can be a “On time-out” section, where we can state what is to happen if the sub-process times out (visually similar to a try/catch with “Finally” and “Catch” on the bottom).
On a slightly related note: A stop watch activity would be nice, too (start(), elapsed(), st…
bcorrea
(Bruno Correa)
January 21, 2020, 6:33pm
6
Everything you do in .NET can be done in uipath using invoke code activity, just not everything was implemented by uipath as activities…
Glad I found this !! Creating the timer and using Invoke Method to start / stop ended up being easier than I thought. Ended up using this (c# - How do I measure how long a function is running? - Stack Overflow ) as the basis for crafting something in my workflow. Works great.
1 Like
I create a new variable called “TimeHack” and set the Variable Type to System.DateTime.
I Assign that value to “Now”. Then at the end, I compare that time to the “Now” time and get my total duration.
1 Like