Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 621 Bytes

README.md

File metadata and controls

44 lines (30 loc) · 621 Bytes


Installation

pip install glossy

Start Decorating

import glossy
import time


@glossy.decorator
def timer(func, *args, **kwargs):
    """
    Timer

    Place this decorator on functions to see how long
    they take to execute.
    """
    start = time.time()
    result = func(*args, **kwargs)
    secs = time.time() - start
    name = func.__name__
    print(f"Function {name} took {secs} seconds")
    return result

Features