diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-31 14:24:10 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-31 14:24:10 +0200 |
commit | 63b63e0f6ab9f743fc34623bb1caa9852227f046 (patch) | |
tree | 721c6c6a7b394dc758ffa12bb3a1261d9817207f /src/lib/time_utils.c | |
parent | 52db4952d80a10aae464274acdd7401267818b28 (diff) | |
parent | 04eb03136466a18d81511e7ccadf51c08faa8edb (diff) | |
download | ouroboros-63b63e0f6ab9f743fc34623bb1caa9852227f046.tar.gz ouroboros-63b63e0f6ab9f743fc34623bb1caa9852227f046.zip |
Merged in dstaesse/ouroboros/be-apple (pull request #230)
lib, ipcp: Compile on Apple junk
Diffstat (limited to 'src/lib/time_utils.c')
-rw-r--r-- | src/lib/time_utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/time_utils.c b/src/lib/time_utils.c index d0b312da..b34e4763 100644 --- a/src/lib/time_utils.c +++ b/src/lib/time_utils.c @@ -140,3 +140,15 @@ int ts_to_tv(const struct timespec * src, return 0; } + +#ifdef __APPLE__ +int clock_gettime(int clock, struct timespec * t) +{ + struct timeval tv; + int ret = gettimeofday(&tv, NULL); + t->tv_sec = tv.tv_sec; + t->tv_nsec = tv.tv_usec * 1000; + (void) clock; + return ret; +} +#endif |