# Path: opc/utils/prof.py
# def timefunc(f, reference=False):
#     global records
# 
#     records[f.__name__] = Record(f.__name__, reference)
# 
#     @wraps(f)
#     def f_timer(*args, **kwargs):
#         global active
# 
#         if not active:
#             return f(*args, **kwargs)
# 
#         start = time.time()
#         result = f(*args, **kwargs)
#         end = time.time()
# 
#         records[f.__name__].addTime(end-start)
# 
#         return result
# 
#     return f_timer


from random import random
from opc.utils.prof import timefunc


# implementation of a linear feedback shift register generator that gives us
# n-bits of pseudo-random values, completing the entire sequence before
# repeating.

# polynomials required to calculate a n-bit lsfr. Higher bits are
# available, just not included here yet.
poly = {
    2:  (2, 1),
    3:  (3, 2),
    4:  (4, 3),

# Path: opc/utils/prof.py
# def timefunc(f, reference=False):
#     global records
# 
#     records[f.__name__] = Record(f.__name__, reference)
# 
#     @wraps(f)
#     def f_timer(*args, **kwargs):
#         global active
# 
#         if not active:
#             return f(*args, **kwargs)
# 
#         start = time.time()
#         result = f(*args, **kwargs)
#         end = time.time()
# 
#         records[f.__name__].addTime(end-start)
# 
#         return result
# 
#     return f_timer


# Path: art/utils/lfsr.py
from random import random
from opc.utils.prof import timefunc



# implementation of a linear feedback shift register generator that gives us
# n-bits of pseudo-random values, completing the entire sequence before
# repeating.

# polynomials required to calculate a n-bit lsfr. Higher bits are
# available, just not included here yet.
poly = {
    2:  (2, 1),
    3:  (3, 2),
    4:  (4, 3),

    5:  (5, 3),