class MathOperations:
    @staticmethod
    def add(x, y):
        '''Adds two numbers and returns the sum.'''
import time
from threading import Thread

COUNT = 50000000

def countdown(n):
    while n > 0:
        n -= 1

# Single-threaded execution
start_single = time.time()
countdown(COUNT)
end_single = time.time()
print(f'Single-threaded time: {end_single - start_single:.4f} seconds')

#Multi-threaded execution (demonstration GIL's effect)
t1 = Thread(target=countdown, args=(COUNT // 2,))
t2 = Thread(target=countdown, args=(COUNT // 2,))

start_multi = time.time()
t1.start()
t2.start()
t1.join()
t2.join()
end_multi = time.time()
print(f'Multi-threaded time: {end_multi - start_multi:.4f} seconds')