diff options
author | Oscar NihlgÄrd <oscarnihlgard@gmail.com> | 2018-04-18 21:24:28 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-18 21:24:28 +0200 |
commit | fdf1d123804df3325211384e1c438295ea23bbd3 (patch) | |
tree | 74d91d6c9ef88ecfb384863709afc4ddbb16f739 /lib/deprecated/pure/sockets.nim | |
parent | b9cafe5752f0772b6c05b78c45cd72b8c0932de2 (diff) | |
download | Nim-fdf1d123804df3325211384e1c438295ea23bbd3.tar.gz |
Change type of `Timeval.tv_sec` to `posix.Time` (#7646)
Diffstat (limited to 'lib/deprecated/pure/sockets.nim')
-rw-r--r-- | lib/deprecated/pure/sockets.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/deprecated/pure/sockets.nim b/lib/deprecated/pure/sockets.nim index f068c7d56..f0568366a 100644 --- a/lib/deprecated/pure/sockets.nim +++ b/lib/deprecated/pure/sockets.nim @@ -953,8 +953,12 @@ when defined(ssl): proc timeValFromMilliseconds(timeout = 500): Timeval = if timeout != -1: var seconds = timeout div 1000 - result.tv_sec = seconds.int32 - result.tv_usec = ((timeout - seconds * 1000) * 1000).int32 + when defined(posix): + result.tv_sec = seconds.Time + result.tv_usec = ((timeout - seconds * 1000) * 1000).Suseconds + else: + result.tv_sec = seconds.int32 + result.tv_usec = ((timeout - seconds * 1000) * 1000).int32 proc createFdSet(fd: var TFdSet, s: seq[Socket], m: var int) = FD_ZERO(fd) |