Merge pull request #2948 from flysand7/fix-do

[core]: Remove `do` keyword from the core library
This commit is contained in:
Jeroen van Rijn
2023-11-11 13:16:12 +01:00
committed by GitHub
9 changed files with 273 additions and 237 deletions
+3 -1
View File
@@ -333,7 +333,9 @@ _set_option :: proc(sock: Any_Socket, option: Socket_Option, value: any, loc :=
.Send_Timeout,
.Receive_Timeout:
t, ok := value.(time.Duration)
if !ok do panic("set_option() value must be a time.Duration here", loc)
if !ok {
panic("set_option() value must be a time.Duration here", loc)
}
micros := cast(i64) (time.duration_microseconds(t))
timeval_value.microseconds = cast(int) (micros % 1e6)