Fixed times on non-posix operating systems.
This commit is contained in:
parent
25ea5c35b8
commit
558d0db89f
1 changed files with 5 additions and 5 deletions
|
|
@ -25,6 +25,10 @@ type
|
|||
TWeekDay* = enum ## represents a weekday
|
||||
dMon, dTue, dWed, dThu, dFri, dSat, dSun
|
||||
|
||||
var
|
||||
timezone* {.importc, header: "<time.h>".}: int
|
||||
tzname* {.importc, header: "<time.h>" .}: array[0..1, cstring]
|
||||
|
||||
when defined(posix):
|
||||
type
|
||||
TTimeImpl {.importc: "time_t", header: "<sys/time.h>".} = int
|
||||
|
|
@ -42,10 +46,6 @@ when defined(posix):
|
|||
proc posix_gettimeofday(tp: var Ttimeval, unused: pointer = nil) {.
|
||||
importc: "gettimeofday", header: "<sys/time.h>".}
|
||||
|
||||
var
|
||||
timezone* {.importc, header: "<time.h>".}: int
|
||||
tzname* {.importc, header: "<time.h>" .}: array[0..1, cstring]
|
||||
|
||||
elif defined(windows):
|
||||
import winlean
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue