def describe_delta(delta):
    """
    Describe a timedelta in human-readable terms.

    eg. "2:00 ahead of"
    eg. "1:00 behind"
    eg. "same as"

    :param delta: datetime.timedelta
    :returns: string
    """
    deltasec = int(delta.total_seconds())
    deltahour, remainder = divmod(deltasec, 3600)
    deltamin = remainder // 60
    deltahour = abs(deltahour)
    if deltasec > 0:
        return '%d:%02d ahead of' % (deltahour, deltamin)
    if deltasec < 0:
        return '%d:%02d behind' % (deltahour, deltamin)
    if deltasec == 0:
        return 'same as'
