def time_calc(ttime):
    """Calculate time elapsed in (hours, mins, secs)

    :param float ttime: Amount of time elapsed

    :return: int, int, float
    """

    # create local copy
    tt = ttime

    # if not divisible by 60 (minutes), check for hours, mins, secs
    if divmod(tt, 60)[0] >= 1:
        h_t = divmod(tt, 60 * 60)[0]
        tt = tt - (h_t * 60 * 60)
        m_t = divmod(tt, 60)[0]
        tt = tt - (m_t * 60)
        s_t = tt

        return h_t, m_t, s_t

    # only return seconds
    else:
        h_t = 0
        m_t = 0
        s_t = tt

        return h_t, m_t, s_t