import time from CrossDown import * if __name__ == '__main__': # 开始计时 start_time = time.perf_counter_ns() # 主程序 with open('README.md', encoding='utf-8') as test: cd, meta = main(test.read()) print(meta) with open('README.html', 'w', encoding='utf-8') as html: html.write(f""" UTF-8编码示例 {indent(HEAD)} {indent(BODY)} {indent(cd, 4)} """) # 停止计时 end_time = time.perf_counter_ns() # 输出用时 print("运行时间: {:.9f} 秒".format((end_time - start_time) / 1e9))