Timing

N

Nick

I have a client who is building an internal questionaire for their
employees. However the twist is that they wish to time the user
*accurately* in how long they actually take to do the test. I have been
further instructed to make the timing solution hidden as much as possible -
so it cannot be hacked. Has anyone got any ideas on how I could implement
this?

Nick.
 
K

Kevin Spencer

Sure. Get the current time when the user requests the first page of the
questionnaire, and store it somewhere (database, Session, etc). When they
post the last page, get the current time again, and subtract the first time
from it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
K

Ken Cox [Microsoft MVP]

You could pass a cookie with the time when the click the "Start" button and
then retrieve the cookie when they click the "Done" button. After that it is
just difference calculation.

To make it really hidden, use a Session variable.
 
N

Nick

Hi Kevin, I had thought about that but I wasnt sure if it would be accurate
enough. For example, because these times are so important, if two people
actually have the same times but the server lags in dealing with a POST from
one of them, it would seem they were slower when it was the server itself
that was the problem. Mayeb I shouldnt worry about that though...

Thanks for replying.
 
N

Nick

Thanks Ken.

Ken Cox said:
You could pass a cookie with the time when the click the "Start" button and
then retrieve the cookie when they click the "Done" button. After that it is
just difference calculation.

To make it really hidden, use a Session variable.
 
K

Kevin Spencer

Well, you're talking about at most a few seconds.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top