def _is_earlier(t1, t2):
    """Compares two timestamps."""
    if t1['secs'] > t2['secs']:
        return False
    elif t1['secs'] < t2['secs']:
        return True
    elif t1['nsecs'] < t2['nsecs']:
        return True

    return False