Expose CTime (#10301)

This commit is contained in:
genotrance
2019-01-14 15:16:11 -06:00
committed by Andreas Rumpf
parent 1899d8d107
commit dd1f23f6fc

View File

@@ -217,7 +217,7 @@ when defined(JS):
elif defined(posix):
import posix
type CTime = posix.Time
type CTime* = posix.Time
var
realTimeClockId {.importc: "CLOCK_REALTIME", header: "<time.h>".}: Clockid
@@ -236,10 +236,10 @@ elif defined(windows):
import winlean
when defined(i386) and defined(gcc):
type CTime {.importc: "time_t", header: "<time.h>".} = distinct int32
type CTime* {.importc: "time_t", header: "<time.h>".} = distinct int32
else:
# newest version of Visual C++ defines time_t to be of 64 bits
type CTime {.importc: "time_t", header: "<time.h>".} = distinct int64
type CTime* {.importc: "time_t", header: "<time.h>".} = distinct int64
# visual c's c runtime exposes these under a different name
var timezone {.importc: "_timezone", header: "<time.h>".}: int