Go Back   Access World Forums > Microsoft Access Reference > Sample Databases

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 02-02-2018, 03:12 PM   #1
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,531
Thanks: 72
Thanked 1,113 Times in 1,037 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Measuring Reaction Times

I've been working on a project involving random events and calculating time intervals to millisecond accuracy

So I decided to use both ideas in a simple application for measuring reaction times. I thought it might be fun for others to play with

The idea is to respond to an event that occurs after a random delay & in a random position on the screen.

It uses the system clock to determine times in milliseconds.

There are 3 levels of difficulty: easy/moderate/hard
Typically I can manage about 0.7s on the easy level - see if you can do better!
The other 2 levels should take longer : in the range 2-12 seconds?

The app opens in a floating window on the desktop with nav pane/ribbon hidden.
To view the code, use the SHIFT key as you open the app.

The app works in both 32-bit & 64-bit Access and can also be run on a tablet

NOTE: system times are updated about 60 times per second so the quoted accuracy is about 16 milliseconds.
Good enough for this example in my view.

There are other ways of measuring time with precision
For example, you can use GetTickCount but that is also based on system time
The built in Timer function can be used to give time to centisecond accuracy though with the same limitation

For mission critical time differences, you could use the StopClock class.
I believe that is accurate to nanoseconds though I've not tested it
https://msdn.microsoft.com/en-us/lib...or=-2147217396

Any feedback, please send me a PM or email me using the link below
Attached Images
File Type: png Screenshot.PNG (24.6 KB, 120 views)
Attached Files
File Type: zip ReactionTimes.zip (132.4 KB, 126 views)

__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by ridders; 02-03-2018 at 01:47 AM. Reason: Extra info about measuring time with precision
ridders is offline   Reply With Quote
The Following 2 Users Say Thank You to ridders For This Useful Post:
Snowflake68 (02-26-2018), Voyager (03-05-2018)
Reply

Tags
milliseconds , random , reaction time

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Measuring performance of each part of large query Stormin Queries 3 06-01-2017 12:43 AM
Access 2007: measuring between dates BoyDay Queries 3 04-22-2012 11:41 AM
Strange reaction to "&" character Fear Naught Forms 8 09-22-2006 06:56 AM
Measuring Alignment Dwight Reports 1 11-25-2005 07:50 AM
Measuring Individual Table Sizes Dwight Tables 4 06-24-2003 01:48 PM




All times are GMT -8. The time now is 11:19 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World