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.
This commit is contained in:
Sebastian Bauer 2014-12-28 10:35:26 +01:00
parent aad27e6ef6
commit 7cf86f923a

View File

@ -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>