mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 21:43:33 +00:00
Fixed times on non-posix operating systems.
This commit is contained in:
@@ -24,7 +24,11 @@ type
|
||||
mJan, mFeb, mMar, mApr, mMay, mJun, mJul, mAug, mSep, mOct, mNov, mDec
|
||||
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
|
||||
@@ -41,10 +45,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
|
||||
|
||||
Reference in New Issue
Block a user