Q:

AttributeError: module 'time' has no attribute 'clock' in Python 3.8

I have written code to generate public and
private keys using the following code:
import time
import os
import hashlib
import hmac
import base64

def generate_key():
    # Generate a public key
    public_key = hmac.new(os.urandom(32), os.urandom(32),