|
|
发表于 2010-9-27 15:54:06
|
显示全部楼层
waituntil 有很多限制条件,监控variable是可以的,表格好像是不行的。另外,这个命令对程序的performance有很大影响,能不用就尽量不要用。有一个技巧,通过不断循环的方式来实现时间点的控制。
) a2 o; `1 C. {. V, H, H6 H/ c
# B9 O4 N1 {# h5 q- z Inow_depart_num := 1;
# i2 O! C$ r, c. C2 Dbegin_time := 0;
; h. V: {) c, }% Q/ Iwhile 1 = 1 loop
1 _8 }; G5 ]2 B0 Z* C depart_time := schedule[now_depart_num];4 V% G- R$ T2 K
wait depart_time - begin_time;
7 |2 b% ?7 y% R+ v& n; ` .... ~2 \& N) c. h
, @, Z0 J; [9 T0 N7 }1 S begin_time := depart_time;& U( \& ^8 w+ g2 D) R
now_depart_num := now_depart_num + 1;
2 Z1 g/ j% f4 R/ h1 H' Zend; |
|