dt2str               package:cwhstring               R Documentation

_C_o_n_v_e_r_t _t_i_m_e _d_i_f_f_e_r_e_n_c_e _t_o _s_t_r_i_n_g.

_D_e_s_c_r_i_p_t_i_o_n:

     Convert time difference to string depending on switch.

_U_s_a_g_e:

       dt2str(dt,verbose=FALSE)

_A_r_g_u_m_e_n_t_s:

      dt: Time difference in seconds

 verbose: If 'TRUE', then "hours minutes seconds", else "::"

_V_a_l_u_e:

     String representing the time difference.

_A_u_t_h_o_r(_s):

     Christian W. Hoffmann, christian.hoffmann@wsl.ch, <URL:
     http://www.wsl.ch/staff/christian.hoffmann>

_E_x_a_m_p_l_e_s:

       time1 <- Sys.time()
       x <- 0
       for (i in 1:100000) x <- x+1
       time2 <- Sys.time()
       dt2str(unclass(time2)-unclass(time1))
       dt2str(unclass(time2)-unclass(time1),TRUE)

