The Signal Assignment
Basically, the purpose is to play with signals. You shall ...
- Catches ^C and prints "That tickles".
- Measures how long it takes to receive a signal. This means
- Get the current time of day with gettimeofday(). Store it in a global variable.
- Sleep for a while with nanosleep // optional
- Loop back a zillion times
- Print the total amount of time, maximum, and minimum
- In the signal handler
- Get the current time of day
- Subtract from the one stored in the global variable
- Increment a total.
- Possibly increment a maximum
- Possibly incerment a minimum
The ^C thing is worth 30%, printing and average latency time is worth 40%, and printing a minimum/maximum is worth 30%.
This program is -5% per school day after Thursday Feb 26th at 1:30pm