diff options
author | Sebastian Bauer <mail@sebastianbauer.info> | 2014-12-28 10:35:26 +0100 |
---|---|---|
committer | Sebastian Bauer <mail@sebastianbauer.info> | 2014-12-28 10:35:47 +0100 |
commit | 7cf86f923ac6ce54afdc1784a7a7fe6ea97f59ca (patch) | |
tree | e4d66df3194e1049a219168a93c9eca3d0491e9d | |
parent | aad27e6ef650904843dc4bd9308db97899e700e2 (diff) | |
download | libgit2-7cf86f923ac6ce54afdc1784a7a7fe6ea97f59ca.tar.gz |
Added AmigaOS-specific implementation of git__timer().
The clock_gettime() function is normally not available under
AmigaOS, hence another solution is required. We are using now
GetUpTime() that is present in current versions of this
operating system.
-rw-r--r-- | src/util.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index 2567838e6..dafb740f8 100644 --- a/src/util.h +++ b/src/util.h @@ -434,6 +434,17 @@ GIT_INLINE(double) git__timer(void) return (double)time * scaling_factor / 1.0E9; } +#elif defined(AMIGA) + +#include <proto/timer.h> + +GIT_INLINE(double) git__timer(void) +{ + struct TimeVal tv; + ITimer->GetUpTime(&tv); + return (double)tv.Seconds + (double)tv.Microseconds / 1.0E6; +} + #else #include <sys/time.h> |