proc.time                package:base                R Documentation

_R_u_n_n_i_n_g _T_i_m_e _o_f _R

_D_e_s_c_r_i_p_t_i_o_n:

     `proc.time' determines how much time (in seconds) the currently
     running R process already consumed.

_U_s_a_g_e:

     proc.time()

_V_a_l_u_e:

     A numeric vector of length 5, containing the user, system, and
     total elapsed times for the currently running R process, and the
     cumulative sum of user and system times of any child processes
     spawned by it.

     The resolution of the times will be system-specific; it is common
     for them to be recorded to of the order of 1/100 second, and
     elapsed time is rounded to the nearest 1/100.

     It is most useful for ``timing'' the evaluation of R expressions,
     which can be done conveniently with `system.time'.

_N_o_t_e:

     It is possible to compile R without support for `proc.time', when
     the function will not exist.

_S_e_e _A_l_s_o:

     `system.time' for timing a valid R expression.

_E_x_a_m_p_l_e_s:

     ptm <- proc.time()
     for (i in 1:50) mad(runif(500))
     proc.time() - ptm

