import time


def measureTime(method):
    """
    Decorator for measuring how long the given function took to execute.
    Credit to: https://thenextweb.com/news/decorators-in-python-make-code-better-syndication

    Args:
        method (function): Function to measure time to execute.
    """
    def wrapper():
        start_time = time.perf_counter()
        method()
        end_time = time.perf_counter()
        print(method.__name__ + ' took ' + str(round((end_time - start_time), 3)) + ' seconds.')

    return wrapper