示例#1
0
def _limiter(last, seconds):
    limit = timedelta(seconds=seconds)
    since = (datetime.now() - last)
    if since < limit:
        raise APIException(
            _("please wait %(duration)s before making another post") % {
                "duration": timesince(datetime.now() - limit + since)})
示例#2
0
def _limiter(last, seconds):
    limit = timedelta(seconds=seconds)
    since = (now() - last)
    if since < limit:
        raise APIException(
            _("please wait %(duration)s before making another post") %
            {"duration": timesince(now() - limit + since)})
示例#3
0
文件: ows.py 项目: djudd/occupywallst
def timesince_short(timestamp):
    return utils.timesince(timestamp)
示例#4
0
def timesince_short(timestamp):
    return utils.timesince(timestamp)