Logo Search packages:      
Sourcecode: abakus version File versions  Download package

TimeStamp.py

def current(new, old):
    return not old is None and new <= old
def collect(signatures):
    if len(signatures)==0:
        return 0
    elif len(signatures)==1:
        return signatures[0]
    else:
        return max(signatures)
def signature(obj):
    return obj.get_timestamp()
def to_string(signature):
    return str(signature)
def from_string(string):
    try:
        return int(string)
    except ValueError:
        return None

Generated by  Doxygen 1.6.0   Back to index