2

I am new to play framework. I want to add a timer to a page which starts as soon as the user opens the page, which displays how long that particular page has been open.

But I have no idea how to implement the timer. Can anybody please tell how to do it.

ac-lap
  • 1,623
  • 2
  • 15
  • 27
  • 1
    You should be able to accomplish this simply with Javascript without any server-side stuff: see [this question](http://stackoverflow.com/questions/5517597/plain-count-up-timer-in-javascript). – Mikesname Oct 05 '13 at 20:48

1 Answers1

1

That's definitelly job for JavaScript not for framework.

There are available ready to use libraries, which you can use for that task, ie: Moment.js or TimeAgo

biesior
  • 55,576
  • 10
  • 125
  • 182