Formats a duration of time as a time string for a locale specified by identifier.
#Include <WinAPIEx.au3>
_WinAPI_GetDurationFormat ( $LCID, $iDuration [, $sFormat] )
$LCID | Locale identifier (LCID) that specifies the locale for which this function formats the duration. If this parameter is 0, the function uses a default locale for the user. |
$iDuration | The number of 100-nanosecond intervals in the duration. Alternatively, this parameter can be a $tagSYSTEMTIME structure that contains the time duration information to format. |
$sFormat | [可选参数] The string that is used to form the duration. For example, "hh:mm:ss.ff". If this parameter is omitted or an empty string, the function returns the string according to the duration format for the specified locale ($LCID). |
Success | The formatted duration string. |
Failure | Empty string and sets the @error flag to non-zero. |
在MSDN中搜索
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $Duration = (90 * 60 + 14) * 1000 * 1000 * 10
ConsoleWrite(_WinAPI_GetDurationFormat(0, $Duration, 'hh:mm:ss') & @CR)
ConsoleWrite(_WinAPI_GetDurationFormat(0, $Duration, 'mm:ss') & @CR)
ConsoleWrite(_WinAPI_GetDurationFormat(0, $Duration, 'ss') & @CR)