r"""
    Args:
        str_ (str):

    Returns:
        float: timedelta

    CommandLine:
        python -m utool.util_time --exec-parse_timedelta_str

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_time import *  # NOQA
        >>> str_ = '24h'
        >>> timedelta = parse_timedelta_str(str_)
        >>> result = ('timedelta = %s' % (str(timedelta),))
        >>> print(result)
        timedelta = 86400.0

def parse_timedelta_str(str_):
    r"""
    Args:
        str_ (str):

    Returns:
        float: timedelta

    CommandLine:
        python -m utool.util_time --exec-parse_timedelta_str

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_time import *  # NOQA
        >>> str_ = '24h'
        >>> timedelta = parse_timedelta_str(str_)
        >>> result = ('timedelta = %s' % (str(timedelta),))
        >>> print(result)
        timedelta = 86400.0
    """
    if str_.endswith('m'):
        timedelta = float(str_[0:-1]) * 60
    elif str_.endswith('h'):
        timedelta = float(str_[0:-1]) * 60 * 60
    elif str_.endswith('s'):
        timedelta = float(str_[0:-1])
    else:
        raise NotImplementedError('Unknown timedelta format %r' % (str_))
    return timedelta