React – trial runs

It is best to see the program in action; of course, the reader would do well (and enjoy this exercise a whole lot more!) to actually build and try it out for himself/herself:

$ ./react Usage: ./react <freq-in-millisec> [verbose-mode:[0]|1]  default: verbosity is off  f.e.: ./react 100   => timeout every 100 ms, verbosity Off      : ./react   5 1 => timeout every   5 ms, verbosity OnHow fast can you react!?Once you run this app with the freq-in-millisec parameter,we shall start a timer anywhere between 1 and 5 seconds ofyour starting it. Watch the screen carefully; the momentthe message "QUICK! Press ^C" appears, press ^C (Ctrl+c simultaneously)!Your reaction time is displayed... Have fun!$ 

We first run it with a 10 millisecond frequency ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.