简体   繁体   中英

Way to calculate the execution time difference of two python scripts using sage

我有两个python脚本Des.pyDDes.py ,我想使用一个Sage脚本来计算它们的执行时间差。

I don't really see why you would want to do this with sage. Just use the time module:

import time

Start_Time = time.time()
#execute script
Execution_Time = time.time() - Start_Time

Execution_Time gives the total execution time in seconds.

Regards,
Harm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM