Need help with this program. Need to create a generic signal handler. Pgrogram hass to count the number of signals generated in a specific time period. The time interval, in milliseconds, is to be entered from the command line. In addition to catching CTRL-C from the keyboard, I have to define and count two additional user defined signals created from either the same or a child process. In addition to the time interval on the command line, input the number of processes to be created ( >0 ) in a chain structure. Each child process must generate each signal a random number of times.

After time elapsed, print out:

1. the number and type of all signals detected by each parent process ( 10 points )

2. the process-id, parent process-id and creation time of all processes created ( 10 points )

3. the user, real, and system time for each process created. (10 points ).

I don't know how to access the system for the timing and run the loop within that time. If anyone can help me with some section coding or an example or some links. Thanks