Is it possible to capture the details of date time of a specific bot message step and the details of date time of user response to that message in a DB table?

Is it possible to capture the details of date time of a specific bot message step and the details of date time of user response to that message in a DB table ?

The usecase is that the client wants to build a quiz bot and they want to capture the time taken by the user in answering a specific question (ie. difference between time at which bot asks question and time at which user responds)