how to create timer in rails? and how to save this time in database in rails?
<p>i have a <code>task</code> model in my rails app. a user will create the task. and  after creating the task, while starting the task a user will start the timer. and after the task is over a user will stop the timer. and i want to record the time taken to implement that task by this timer. what should be the datatype to record this duration? here i want to have two buttons start and stop. and upon the stop button click, i want to record the duration and want to save in the database. in what way i can implement this <code>timer</code>in Rails. is there any gem for this kind of functionality?</p>