計算經過的時間

出自 ArcoWiki
於 2018年6月4日 (一) 12:20 由 Slia (對話 | 貢獻) 所做的修訂 (创建页面,内容为“This is used to '''calculate the time between two moments''' in the program execution.<br/> It is typically used to calculate the execution time of a program.<br/>…”)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
前往: 導覽搜尋

This is used to calculate the time between two moments in the program execution.
It is typically used to calculate the execution time of a program.

$$Begin Example…

DECL/CHAR,100,start_time,end_time,elapsed_time_form1, elapsed_time_form2

$$Reading Start time

start_time = ASSIGN/SDATETIME()

$$ stop the execution for 2 seconds

DMESW/DELAY,2

$$Reading End Time

end_time = ASSIGN/SDATETIME()

$$Elapsed Time without indication of day

elapsed_time_form1 = ASSIGN/SELAPSETIME(start_time, end_time, LONG)

$$ Elapsed Time with Indication of day

elapsed_time_form2 = ASSIGN/SELAPSETIME(start_time, end_time, SHORT)