Opened 11 years ago
Closed 11 years ago
#2968 closed Feature Request (Completed)
Add mSeconds to _SetTime function
| Reported by: | anonymous | Owned by: | guinness |
|---|---|---|---|
| Milestone: | 3.3.13.20 | Component: | AutoIt |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
Add mSeconds also to "Date.au3" library in the function: _SetTime.
Attachments (0)
Change History (3)
comment:1 by , 11 years ago
| Version: | 3.3.12.0 |
|---|
comment:2 by , 11 years ago
Replying to anonymous:
Add mSeconds also to "Date.au3" library in the function: _SetTime.
Func _SetTime($iHour, $iMinute, $iSecond = 0, $mSecond = 0)
;============================================================================
;== Some error checking
;============================================================================
If $iHour < 0 Or $iHour > 23 Then Return 1
If $iMinute < 0 Or $iMinute > 59 Then Return 1
If $iSecond < 0 Or $iSecond > 59 Then Return 1
If $mSecond < 0 Or $mSecond > 999 Then Return 1
Local $tSYSTEMTIME = DllStructCreate($tagSYSTEMTIME)
;============================================================================
;== Get the local system time to fill up the SYSTEMTIME structure
;============================================================================
DllCall("kernel32.dll", "none", "GetLocalTime", "struct*", $tSYSTEMTIME)
If @error Then Return SetError(@error, @extended, 0)
;============================================================================
;== Change the necessary values
;============================================================================
DllStructSetData($tSYSTEMTIME, "Hour", $iHour)
DllStructSetData($tSYSTEMTIME, "Minute", $iMinute)
If $iSecond > 0 Then DllStructSetData($tSYSTEMTIME, "Second", $iSecond);Alx
If $mSecond > 0 Then DllStructSetData($tSYSTEMTIME, "MSeconds", $mSecond);Alx
;============================================================================
;== Set the new time
;============================================================================
Local $iRetval = _Date_Time_SetLocalTime($tSYSTEMTIME)
If @error Then Return SetError(@error + 10, @extended, 0)
Return Int($iRetval)
EndFunc ;==>_SetTime
comment:3 by , 11 years ago
| Milestone: | → 3.3.13.20 |
|---|---|
| Owner: | set to |
| Resolution: | → Completed |
| Status: | new → closed |
Added by revision [11185] in version: 3.3.13.20

Automatic ticket cleanup.