Fix posix_gettimeofday compilation error.

This commit is contained in:
Your Name 2018-05-17 12:18:23 +03:00
parent 570467a306
commit f614223d40
1 changed files with 4 additions and 1 deletions

View File

@ -22,8 +22,11 @@ when defined(windows):
elif defined(macosx):
from posix import posix_gettimeofday, Timeval
from posix import Timeval
proc posix_gettimeofday(tp: var Timeval, unused: pointer = nil) {.
importc: "gettimeofday", header: "<sys/time.h>".}
proc fastEpochTime*(): uint64 {.inline.} =
var t: Timeval
posix_gettimeofday(t)