used the linux os libraries as a based and fixed up the time

the most interesting change is in the timehelper.c file. we need to handle time differently from linux as the librt library is deprecated on osx machines.