session is your friend.
At start of test, store start time.
At end of time, use it to figure difference.
--
-- Tom Mornini
On Feb 13, 2006, at 4:00 PM, Carl Woodward wrote:
> Hi everyone,
>
> I have a quick problem. What I want to do is time how long a user
> takes to do a test. To do this I would like to start a thread which
> increments the time for a user. I would like do this for multiple
> users and so I wanted to use a hash class variable (static). This
> doesn''t work from my rails app, how ever it works fine in my test
> code. After doing some research I see that webrick executes each
> request in a seperate thread. I think this is my issue and it explains
> some other decisions made in rails (like storing session data in a
> cookie).
>
> I am now thinking that I will have to do a seperate little app that
> can time items based on an id. Then have a webservice that can be
> access via my rails app. Does anyone have any ideas on how I can
> achieve what I want without having a seperate application?
>
> Thanks,
> Carl.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails