zgyin的个人博客分享 http://blog.sciencenet.cn/u/zgyin

博文

class-命令推迟执行

已有 2756 次阅读 2015-7-30 14:22 |个人分类:class|系统分类:科研笔记

help sic delay
SIC DELAY
       [SIC]SIC DELAY Seconds
       [SIC]SIC DELAY
 
   Delay the execution of commands. SIC DELAY is used  in  two  times.  The
   first  call  is  given a duration as argument. Added to the current date
   and time, this defines a virtual milestone in the future. The next  call
   without argument will wait for this milestone if it has not been reached
   yet, or will return without waiting if the limit is already past. During
   the waiting time, CTRL-C can be used to exit the command.
 
   An application of SIC DELAY is to slow down the execution of loops which
   display or draw useful informations to the user. In the  example  below,
   we ensure that the loops are executed every second (or more), instead of
   depending on the CPU speed which varies over machines and epochs:
      FOR I 1 to 10
        SIC DELAY 1.0
        Do something
        SIC DELAY
      NEXT

class 中的sic delay命令可以延迟执行程序

例如我把处理出来的结果放在platform.zcp中啦,我想检查每条谱线,于是我用了sic delay 2.0这个命令,这样没张图片都可以停留两秒,我就能看清楚没张图片啦

file in platform.zcp
find
for i 1 to 500
SIC DELAY 2.0
get i
plot  
SIC DELAY
next i




https://blog.sciencenet.cn/blog-783377-909358.html

上一篇:class- for 循环
下一篇:fedora 20 安装google-chrome浏览器
收藏 IP: 159.226.171.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-23 14:27

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部