The Mackworth clock test (Mackworth, 1948) assesses people’s vigilance. Vigilance is a state of concentration that helps people to detect specific events when not much is going on.

For example, in real life, a guard must be vigilant when looking after something. That can be hard when you are standing guard for hours, when it is at night and it is quiet. Vigilance is difficult because it gets quite boring, because typically nothing happens.

Vigilance is necessary in a number of jobs, such as guards and air traffic controllers.

The Mackworth clock test was originally designed as a physical real device (looking like a clock), although computer based versions have later been developed (Lichtstein et al., 2000).

About this implementation

Watch the clock hand move around. When the hand jumps more than normally, press the space bar immediately. You will get an error signal (red light) when you press the space bar when there was no unusual clock hand jumping or when you failed to detect it. You get positive feedback (green light) when you press the space bar correctly.

Note that you must respond quickly (within 1 s).

Also note that the likelihood of a "jump" of the clock hand is in this implementation around 10%, whereas in the real task it is just over half a percent!!! You can easily change this in the code by changing the line with the instruction with the random number. Change it from set &randomnumber random 1 10 to set &randomnumber random 1 150.
You can easily adapt this task, you can change the number of steps in a circle, the speed, etc.

Run the demo

In this example, you will

Data output file

In PsyToolkit, the data output file is simply a textfile. The save line of the PsyToolkit experiment script determines what is being saved in the data output file. Typically, for each experimental trial, you would have exactly one line in your text file, and each number/word on that line gives you the information you need for your data analysis, such as the condition, response speed, and whether an error was made.

Meaning of the columns in the output datafile. You need this information for your data analysis.

Colum Meaning


reaction time. should be 1000 most of the time (that is the "timeout" time)


status (should be 3 most of the time, that is, no key was pressed and the status is "timeout")


the current position of the hand (in tenth of degrees)


a random number between 1 and 10 (if it is 10, there is a bigger jump of the clock hand)


value 1 means this trial had a correct detection (only relevant if column 4 has value 10)


value 1 means that this trial had an incorrect detection (i.e., space bar pressed, even though there was nothing to detect)


value 1 means missed detection (the participant failed to press space bar


If you have a PsyToolkit account, you can upload the zipfile directly to your PsyToolkit account. Watch a video on how to do that. If you want to upload the zipfile into your PsyToolkit account, make sure the file is not automatically uncompressed (some browsers, especially Mac Safari, by default uncompress zip files). Read here how to easily deal with this.

Further reading

  • Mackworth, N. H. (1948). The breakdown of vigilance during prolonged visual search. Quarterly Journal of Experimental Psychology, vol. 1, pp.6-21

  • Lichstein, K. L., Riedel, B. W., & Richman, S. L. (2000). The Mackworth clock test: A computerized version (statistical data included). The Journal of Psychology.