def timeago(secs, precision=0):
    """
    Return human-readable string of seconds elapsed.

    :param int secs: number of seconds "ago".
    :param int precision: optional decimal precision of returned seconds.

    Pass a duration of time and return human readable shorthand, fe::

        >>> asctime(126.32)
        ' 2m 6s',
        >>> asctime(70.9999, 2)
        ' 1m 10.99s'
    """
    years = weeks = days = mins = hours = 0
    mins, secs = divmod(secs, 60)
    hours, mins = divmod(mins, 60)
    days, hours = divmod(hours, 24)
    weeks, days = divmod(days, 7)
    years, weeks = divmod(weeks, 52)
    (num1, num2), (label1, label2) = ((years, weeks), (u'y', u'w')
        ) if years >= 1.0 else ((weeks, days), (u'w', u'd')
        ) if weeks >= 1.0 else ((days, hours), (u'd', u'h')
        ) if days >= 1.0 else ((hours, mins), (u'h', u'm')
        ) if hours >= 1.0 else ((mins, secs), (u'm', u's'))
    return u'%2d%s%2.*f%s' % (num1, label1, precision, num2, label2)
