StrFromTimeIntervalA (SHLWAPI.@)
INT StrFromTimeIntervalA ( LPSTR lpszStr, UINT cchMax, DWORD dwMS, int iDigits )
Format a millisecond time interval into a string.
lpszStr | [Out] | Output buffer for formatted time interval. |
cchMax | [In] | Size of lpszStr. |
dwMS | [In] | Number of milliseconds. |
iDigits | [In] | Number of digits to print. |
The length of the formatted string, or 0 if any parameter is invalid.
This implementation mimics the Win32 behaviour of always writing a leading space before the time interval begins.
iDigits is used to provide approximate times if accuracy is not important. This number of digits will be written of the first non-zero time class (hours/minutes/seconds). If this does not complete the time classification, the remaining digits are changed to zeros (i.e. The time is _not_ rounded). If there are digits remaining following the writing of a time class, the next time class will be written.
For example, given dwMS represents 138 hours,43 minutes and 15 seconds, the following will result from the given values of iDigits:
iDigits 1 2 3 4 5 ... lpszStr "100 hr" "130 hr" "138 hr" "138 hr 40 min" "138 hr 43 min" ...
Declared in "include/shlwapi.h". gitlab.winehq.org/wine/wine/blob/master/include/shlwapi.h
Implemented in "dlls/shlwapi/string.c". gitlab.winehq.org/wine/wine/blob/master/dlls/shlwapi/string.c
Debug channel "shell".
Copyright © 2024 The Wine Project. All trademarks are the property of their respective owners. Visit WineHQ for license details. Generated Nov 2024.