File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -741,11 +741,12 @@ end
741741 linelen += 1
742742 c = getc(fp)
743743 end
744- fseek(fp, (c < 0 ) - linelen - 1 )
744+ offset_fseek = Sys. iswindows() ? 2 : 1
745+ fseek(fp, (c < 0 ) - linelen - offset_fseek)
745746 str = MallocString(undef, linelen + 1 ) # str[end] == 0x00
746747 if linelen > 0
747748 gets!(str, fp, linelen)
748- fseek(fp, 1 ) # Advance by 1
749+ fseek(fp, offset_fseek ) # Advance by the offset
749750 end
750751 return str
751752 end
Original file line number Diff line number Diff line change @@ -321,6 +321,24 @@ julia> usleep(1000000)
321321end
322322
323323
324+ """
325+ ```julia
326+ sleep_win(sec::Real)
327+ ```
328+ sleep function for Windows using Sleep()
329+
330+ ## Examples
331+ ```julia
332+ julia> sleep_win(2.5)
333+ 0
334+ ```
335+ """
336+ function sleep_win(secs:: Real )
337+ millisecs = round(Int, secs * 1000 )
338+ @symbolcall Sleep(millisecs :: Int ) :: Int
339+ end
340+
341+
324342"""
325343```julia
326344system(s)
You can’t perform that action at this time.
0 commit comments