Profiling execution time

    0

    7

    Python public recipes

    Shortcut: time.profiling

    import time
    
    start_time = time.time()
    # do things
    
    end_time = time.time()
    time_taken = end_time - start_time
    print(f"Time taken in seconds: {int(time_taken)}")
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.