I ended up with a situation where I need a "floor" rather than "round". Or please let me know how to replace parseInt function without floor.
Basically calculate a call duration catching start date and end date with "Now".
Here is what I would do in poor javascript
// Calculate difference in milliseconds
let differenceInMs = endTime - startTime;
// Convert difference to minutes and seconds
let differenceInMinutes = differenceInMs / 1000 / 60;
let minutes = parseInt(differenceInMinutes);
let seconds = Math.round((differenceInMinutes - minutes) * 60);