Timer ¶
Used to measure the computation time of an algorithm.
The sole purpose of the Timer class is to create a Timing object in a safe way, i.e., to ensure that the Timing object always holds a starting and finishing time.
Examples:
Basic usage:
>>> from luna_quantum import Timer
>>> timer = Timer.start()
>>> solution = ... # create a solution by running an algorithm.
>>> timing = timer.stop()