I'm trying to figure out the best solution to create a "game-round" timer in Ruby/Rails. Right now I'm just jotting notes, but in theory I'd like to set a 30 second timer on each round of game activity. Once the timer hits 0, the users turn is over.
On Ruby's end, I know I can accomplish this with a while loop and sleep(30), or some combination of the Timer class.
However, i'm getting stumped trying to design the best way to show the user their time left on the clock. Use Ajax? periodiocally_call_remote? What should I query for?
Just thinking out loud, figured I'd ask the crowd.