home *** CD-ROM | disk | FTP | other *** search
-
-
-
- GGGGEEEETTTTIIIITTTTIIIIMMMMEEEERRRR((((2222)))) GGGGEEEETTTTIIIITTTTIIIIMMMMEEEERRRR((((2222))))
-
-
-
- NNNNAAAAMMMMEEEE
- getitimer, setitimer - get/set value of interval timer
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttiiiimmmmeeee....hhhh>>>>
-
- ####ddddeeeeffffiiiinnnneeee IIIITTTTIIIIMMMMEEEERRRR____RRRREEEEAAAALLLL 0000 ////**** rrrreeeeaaaallll ttttiiiimmmmeeee iiiinnnntttteeeerrrrvvvvaaaallllssss ****////
- ####ddddeeeeffffiiiinnnneeee IIIITTTTIIIIMMMMEEEERRRR____VVVVIIIIRRRRTTTTUUUUAAAALLLL 1111 ////**** vvvviiiirrrrttttuuuuaaaallll ttttiiiimmmmeeee iiiinnnntttteeeerrrrvvvvaaaallllssss ****////
- ####ddddeeeeffffiiiinnnneeee IIIITTTTIIIIMMMMEEEERRRR____PPPPRRRROOOOFFFF 2222 ////**** uuuusssseeeerrrr aaaannnndddd ssssyyyysssstttteeeemmmm vvvviiiirrrrttttuuuuaaaallll ttttiiiimmmmeeee ****////
-
- iiiinnnntttt ggggeeeettttiiiittttiiiimmmmeeeerrrr((((iiiinnnntttt wwwwhhhhiiiicccchhhh,,,, ssssttttrrrruuuucccctttt iiiittttiiiimmmmeeeerrrrvvvvaaaallll ****vvvvaaaalllluuuueeee))));;;;
-
- iiiinnnntttt sssseeeettttiiiittttiiiimmmmeeeerrrr((((iiiinnnntttt wwwwhhhhiiiicccchhhh,,,, ssssttttrrrruuuucccctttt iiiittttiiiimmmmeeeerrrrvvvvaaaallll ****vvvvaaaalllluuuueeee,,,,
- ssssttttrrrruuuucccctttt iiiittttiiiimmmmeeeerrrrvvvvaaaallll ****oooovvvvaaaalllluuuueeee))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The system provides each process with three interval timers, defined in
- <ssssyyyyssss////ttttiiiimmmmeeee....hhhh>. The _g_e_t_i_t_i_m_e_r call returns the current value for the timer
- specified in _w_h_i_c_h, while the _s_e_t_i_t_i_m_e_r call sets the value of a timer
- (optionally returning the previous value of the timer).
-
- A timer value is defined by the _i_t_i_m_e_r_v_a_l structure:
-
- struct itimerval {
- struct timeval it_interval; /* timer interval */
- struct timeval it_value; /* current value */
- };
-
- If _i_t__v_a_l_u_e is non-zero, it indicates the time to the next timer
- expiration and not the time the timer was set originally. If _i_t__i_n_t_e_r_v_a_l
- is non-zero, it specifies a value to be used in reloading _i_t__v_a_l_u_e when
- the timer expires. Setting _i_t__v_a_l_u_e to 0 disables a timer. Setting
- _i_t__i_n_t_e_r_v_a_l to 0 causes a timer to be disabled after its next expiration
- (assuming _i_t__v_a_l_u_e is non-zero).
-
- For IIIITTTTIIIIMMMMEEEERRRR____VVVVIIIIRRRRTTTTUUUUAAAALLLL and IIIITTTTIIIIMMMMEEEERRRR____PPPPRRRROOOOFFFF, the timer resolution is 100 HZ (which
- equals 10 milliseconds). Time values that are not a multiple of 100 HZ
- will be rounded to a multiple.
-
- For IIIITTTTIIIIMMMMEEEERRRR____RRRREEEEAAAALLLL, the timer resolution is 100 HZ (which equals 10
- milliseconds) for normal processes. For processes with a real time
- scheduling policy (see _s_c_h_e_d _s_e_t_s_c_h_e_d_u_l_e_r (2)), actual resolution of the
- clock depends on the timer capability of the underlying hardware (see
- _t_i_m_e_r_s (5)). To avoid a reduction in overall system performance, normal
- processes are not permitted to use the high resolution timers, since fast
- itimer requests can add considerable system overhead.
-
- The IIIITTTTIIIIMMMMEEEERRRR____RRRREEEEAAAALLLL timer decrements in real time. A SSSSIIIIGGGGAAAALLLLRRRRMMMM signal is
- delivered when this timer expires.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- GGGGEEEETTTTIIIITTTTIIIIMMMMEEEERRRR((((2222)))) GGGGEEEETTTTIIIITTTTIIIIMMMMEEEERRRR((((2222))))
-
-
-
- The IIIITTTTIIIIMMMMEEEERRRR____VVVVIIIIRRRRTTTTUUUUAAAALLLL timer decrements in process virtual time. It runs
- only when the process is executing. A SSSSIIIIGGGGVVVVTTTTAAAALLLLRRRRMMMM signal is delivered when
- it expires.
-
- The IIIITTTTIIIIMMMMEEEERRRR____PPPPRRRROOOOFFFF timer decrements both in process virtual time and when
- the system is running on behalf of the process. It is designed to be
- used by interpreters in statistically profiling the execution of
- interpreted programs. Each time the IIIITTTTIIIIMMMMEEEERRRR____PPPPRRRROOOOFFFF timer expires, the
- SSSSIIIIGGGGPPPPRRRROOOOFFFF signal is delivered. Because this signal may interrupt in-
- progress system calls, programs using this timer must be prepared to
- restart interrupted system calls.
-
- NNNNOOOOTTTTEEEESSSS
- Three macros for manipulating time values are defined in <ssssyyyyssss////ttttiiiimmmmeeee....hhhh>.
- _t_i_m_e_r_c_l_e_a_r sets a time value to zero, _t_i_m_e_r_i_s_s_e_t tests if a time value is
- non-zero, and _t_i_m_e_r_c_m_p compares two time values (beware that >= and <= do
- not work with this macro).
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ftimer(1), lboot(1M), npri(1), systune(1M), schedctl(2), sigset(2),
- timers(5).
-
- FFFFIIIILLLLEEEESSSS
- /var/sysgen/mtune/kernel fast itimer configuration variables.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- If the calls succeed, a value of 0 is returned. If an error occurs, the
- value -1 is returned, and _e_r_r_n_o will be set. _s_e_t_i_t_i_m_e_r and _g_e_t_i_t_i_m_e_r
- will fail if any of the following are true:
-
- [EFAULT] The _v_a_l_u_e or _o_v_a_l_u_e structure specified a bad address.
-
- [EINVAL] A _v_a_l_u_e structure specified a time was too large to be
- handled.
-
- BBBBUUUUGGGGSSSS
- _s_e_t_i_t_i_m_e_r calls reset the alarm clock (see _a_l_a_r_m(2)) of the calling
- process.
-
- Programs cannot use _g_e_t_i_t_i_m_e_r(_2) to accurately determine how much time
- remains until the timer expires. On the Challenge/Onyx hardware family,
- _i_t__v_a_l_u_e is not updated at a constant rate.
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-