Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)
Hack to provide second precision under 2 minutes 

        def timesince(d, now=None, reversed=False):
    """ Hack to provide second precision under 2 minutes """
    if not now:
        now = datetime.now(utc if is_aware(d) else None)
    delta = (d - now) if reversed else (now - d)
    s = django_timesince(d, now=now, reversed=reversed)
    if len(s.split(' ')) is 2:
        count, name = s.split(' ')
        if name in ['minutes', 'minute']:
            seconds = delta.seconds % 60
            extension = '%(number)d %(type)s' % {'number': seconds, 'type': 'seconds'}
            if int(count) is 0:
                return extension
            elif int(count) < 2:
                s += ', %s' % extension
    return s

src/c/o/confine-controller-0.10.5/controller/admin/utils.py   confine-controller(Download)
from controller.models.utils import get_field_value
from controller.utils.time import timesince, timeuntil
    if not date:
        return 'Never'
    date_rel = timesince(date)
    if not double:
        date_rel = date_rel.split(',')[0]

src/c/o/confine-controller-0.10.5/controller/apps/state/admin.py   confine-controller(Download)
from controller.models.utils import get_help_text
from controller.utils.html import urlize
from controller.utils.time import timesince
from nodes.admin import STATES_COLORS as NODE_STATES_COLORS
from nodes.models import Node
    def display_start_date(self, instance):
        time = instance.start.strftime('%b. %d, %Y, %I:%M %P')
        time_since = timesince(instance.start)
        return mark_safe('<span title="%s ago">%s</span>' % (time_since, time))
    display_start_date.admin_order_field = 'start'
    display_start_date.short_description = 'Started Date/time'
    def display_end_date(self, instance):
        time = instance.end.strftime('%b. %d, %Y, %I:%M %P')
        time_since = timesince(instance.end)