From f614223d40cf1d8278861605550f84920b093e52 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 17 May 2018 12:18:23 +0300 Subject: [PATCH] Fix posix_gettimeofday compilation error. --- asyncdispatch2/timer.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/asyncdispatch2/timer.nim b/asyncdispatch2/timer.nim index 3b0e228..ff1c4b5 100644 --- a/asyncdispatch2/timer.nim +++ b/asyncdispatch2/timer.nim @@ -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: "".} + proc fastEpochTime*(): uint64 {.inline.} = var t: Timeval posix_gettimeofday(t)