<html><body><div>It's my first time posting to users mailing list so hello everyone.</div><div><br data-mce-bogus="1"></div><div>I'm currently optimizing code of my server written in Swift. To do that reliably I want to be able to measure how long it takes to execute specific methods. </div><div><br data-mce-bogus="1"></div><div>On OSX I'm using <span class="s1">mach_absolute_time</span><span class="s2">() that I've wrapped in a struct for easier interaction and it works fine. Now I'd like to do the same tests on a copy of my actual platform that runs Ubuntu 15.10.</span></div><div><span class="s2"><br data-mce-bogus="1"></span></div><div><span class="s2"> Mach0 library that I use is not available on Linux, instead I could use gettimeofday or&nbsp;clock_gettime. For that I would have to expose&nbsp;time.h to my swift code, however I'm unsure how to do it exactly. </span></div><div><span class="s2">I have started putting my timing struct in a swift package as a first step. Now I'm stuck and h</span><span class="s2">ere are my questions:</span></div><div><span class="s2">&nbsp; &nbsp; * How exactly do I use clang's modulemap with package manager?</span></div><div><span class="s2">&nbsp; &nbsp; * How do I make modulemap include time.h only on Linux?</span></div><div><span class="s2">&nbsp; &nbsp; * Is it necessary to include full path to time.h header or I can omit it in case of system headers?</span></div><div><span class="s2"><br data-mce-bogus="1"></span></div><div><span class="s2">Here is a link to my package for future reference (no linux code there for now).</span></div><div><span class="s2">https://github.com/michalkalinowski-/Timer</span></div><div><span class="s2"><br data-mce-bogus="1"></span></div><div><span class="s2">Also, if anyone is aware of a package that uses C library in place of OSX C method to work cross-platform please let me know. It would be a great guidance for me as I have a very vague idea of how package manager and C libs import work.</span></div><div><span class="s2"><br data-mce-bogus="1"></span></div><div><span class="s2">Regards,</span></div><div><span class="s2">M. Kalinowski</span></div></body></html>