Why not set the start time when starting, when ending set the end time and calculate and set the duration based on that?
Hello Vishal bhatt,
On your entity(Exam) you need to have three attributes starttime; duration; maximumEndtime, when you start the exam you need to have a micro/nano flow and set the starttime and calculate the maximum end time(start time + duration) then commit the ExamObject and start the exam(open exam page).
On the exam page you need a dataview with the Exam object and within the dataview the timer widget, as attribute you use ExamMaximumEndTime and in the action you can specify your action(probably you want to save and close the exam and all the questions and responses).
Hope this helps,
Good luck!