Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 760 Bytes

sample_105.md

File metadata and controls

30 lines (23 loc) · 760 Bytes

主页

时间以毫秒为单位,用字符串表示(如1小时24分36秒)

翻译:xinjie 2021.02.09

代码:

DECLARE INTEGER StrFromTimeInterval IN Shlwapi;
	STRING @ pszOut,;
   	INTEGER  cchMax,;
   	INTEGER  dwTimeMS,;
	INTEGER  digits

DECLARE INTEGER GetTickCount IN kernel32

lnFromStart = GetTickCount()
? "自系统启动以来的时间:", lnFromStart

pszOut = SPACE(50)
FOR lnMax=1 TO 10
	lnLen = StrFromTimeInterval (@pszOut, Len(pszOut), lnFromStart, lnMax)
	? LEFT (pszOut, lnLen)
ENDFOR  

函数列表:

GetTickCount
StrFromTimeInterval