mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 05:23:20 +00:00
Expose CTime (#10301)
This commit is contained in:
committed by
Andreas Rumpf
parent
1899d8d107
commit
dd1f23f6fc
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user