MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / count_time

Function count_time

machine_learning/sequential_minimum_optimization.py:437–446  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

435
436
437def count_time(func):
438 def call_func(*args, **kwargs):
439 import time
440
441 start_time = time.time()
442 func(*args, **kwargs)
443 end_time = time.time()
444 print(f"SMO algorithm cost {end_time - start_time} seconds")
445
446 return call_func
447
448
449@count_time

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected