diff options
Diffstat (limited to 'src/libstddjb/timespec_from_tai_relative.c')
-rw-r--r-- | src/libstddjb/timespec_from_tai_relative.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/libstddjb/timespec_from_tai_relative.c b/src/libstddjb/timespec_from_tai_relative.c deleted file mode 100644 index 42f2e95..0000000 --- a/src/libstddjb/timespec_from_tai_relative.c +++ /dev/null @@ -1,19 +0,0 @@ -/* ISC license. */ - -#include <sys/types.h> -#include <time.h> -#include <errno.h> -#include <skalibs/sysdeps.h> -#include <skalibs/uint64.h> -#include <skalibs/tai.h> - -int timespec_from_tai_relative (struct timespec *ts, tai_t const *t) -{ - if (tai_sec(t) >= (uint64)1 << 63) return (errno = EINVAL, 0) ; -#if SKALIBS_SIZEOFTIME < 8 - if (tai_sec(t) > 0xffffffffU) return (errno = ERANGE, 0) ; -#endif - ts->tv_sec = (time_t)tai_sec(t) ; - ts->tv_nsec = 0 ; - return 1 ; -} |