# To get the time duration of a particular step using JavaScript

Javascript to find the time duration of a particular step:

var $startTime = new Date().getTime(); ---- Before the step starts  
\--- Actual Steps  
var $endTime = new Date().getTime(); ---- After the step  
var $diff = $startTime - $endTime — Log the difference  
\_log("" + $diff); — Display it

---

Last updated: October 15, 2026

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>