-
-
April 21, 2022 at 9:38 amArmy LopezSubscriber我自己编写了一个script文件,里面有多次循环Run 的代码,我想统计从 运行这个script到结束 总的时间,请问有没有相应的命令? 类似于matlab中的tic toc?我在Lumerical scripting language中没有找到。。。
-
April 22, 2022 at 5:23 pmGuilin SunAnsys Employee可以使用简单的命令 ?now; https://support.lumerical.com/hc/en-us/articles/360034411694-now-Script-command 返回UNIX系统的时间。 你也可以试这个脚本:fname="cur_time.txt"; # file name to store current time cmd="echo %time% > "+fname; # system command to get current time and write to fname system(cmd); # run command to get time and save to file cur_time=read(fname); # read time from file ?cur_time; # current time: Hr, Min, Sec 运行前和运行后使用它。也可以把这个脚本设置为函数,每次调用,减少主程序的行数。 目前这两个方法都工作,你试一下看看。
-
Viewing 1 reply thread
- The topic ‘关于仿真时间的计算’ is closed to new replies.
Ansys Innovation Space
Trending discussions
Top Contributors
-
1762
-
635
-
599
-
591
-
366
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.