Time calculation

Here’s an outline with best practices for making your inquiry.

My question:
Not sure how to calculate time difference(in secs/mins only) between two postman requests

Details (like screenshots):
I have 2 requests and I trigger them 1 after the other and log the executed time in (hh:mm:ss) and save them to env variable (using moment)

How I found the problem:
In the second request I’m not sure how to calculate the time taken to execute the expected response in the second request
1 req response : 14:20:40
2 req response : 14:30:45
I want to compute in the second request tests -: 2 req response - 1 req response and log it in console

I’ve already tried:

var moment = require('moment');

var beginningTime = moment('14:20:40', 'hh:mm:ss');
var endTime = moment('14:30:45', 'hh:mm:ss');


console.log('Difference is ', endTime.diff(beginningTime,'seconds'), 'seconds');


@mdjones Thankyou very much for the help and detailed steps much appreciated :pray: