Expose CTime (#10301)
This commit is contained in:
parent
1899d8d107
commit
dd1f23f6fc
1 changed files with 3 additions and 3 deletions
|
|
@ -217,7 +217,7 @@ when defined(JS):
|
||||||
elif defined(posix):
|
elif defined(posix):
|
||||||
import posix
|
import posix
|
||||||
|
|
||||||
type CTime = posix.Time
|
type CTime* = posix.Time
|
||||||
|
|
||||||
var
|
var
|
||||||
realTimeClockId {.importc: "CLOCK_REALTIME", header: "<time.h>".}: Clockid
|
realTimeClockId {.importc: "CLOCK_REALTIME", header: "<time.h>".}: Clockid
|
||||||
|
|
@ -236,10 +236,10 @@ elif defined(windows):
|
||||||
import winlean
|
import winlean
|
||||||
|
|
||||||
when defined(i386) and defined(gcc):
|
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:
|
else:
|
||||||
# newest version of Visual C++ defines time_t to be of 64 bits
|
# 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
|
# visual c's c runtime exposes these under a different name
|
||||||
var timezone {.importc: "_timezone", header: "<time.h>".}: int
|
var timezone {.importc: "_timezone", header: "<time.h>".}: int
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue