Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - StrFromTimeInterval

Posted in WinTask

'
' StrFromTimeInterval
'

' Author: Joe Strazzere
'

 

'External("shlwapi.dll","StrFromTimeIntervalA",pszOut,cchMax,dwTimeMS,digits)

'pszOut
'[out] Pointer to a character buffer that receives the converted string.

'cchMax
'[in] Size of pszOut, in characters. If cchMax is set to zero,
'     StrFromTimeInterval will return the minimum size of the character buffer
'     needed to hold the converted string. In this case, pszOut will not contain the converted string.

'dwTimeMS
'[in] Time interval, in milliseconds.

'digits
'[in] Maximum number of digits to be represented in pszOut. Some examples are:
' dwTimeMS digits pszOut
' 34000    3      34 sec
' 34000    2      34 sec
' 34000    1      30 sec
' 74000    3      1 min 14 sec
' 74000    2      1 min 10 sec
' 74000    1      1 min

 

a$="                                        "

ret=External("shlwapi.dll","StrFromTimeIntervalA",a$,40,74000,3)
msgbox(a$)

ret=External("shlwapi.dll","StrFromTimeIntervalA",a$,40,74000,2)
msgbox(a$)

ret=External("shlwapi.dll","StrFromTimeIntervalA",a$,40,74000,1)
msgbox(a$)

 

StartTimer(1)
pause 3 secs
i=Timer(1)*10
ret=External("shlwapi.dll","StrFromTimeIntervalA",a$,40,i,3)

msgbox(Str$(i)+" milliseconds = "+a$)
StopTimer(1)


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now