Rename lib files to and prefix lib function names
[khatus.git] / x5 / khatus_lib_time.c
diff --git a/x5/khatus_lib_time.c b/x5/khatus_lib_time.c
deleted file mode 100644 (file)
index d13f689..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <errno.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "khatus_lib_log.h"
-#include "khatus_lib_time.h"
-
-struct timespec
-timespec_of_float(double n)
-{
-       double integral;
-       double fractional;
-       struct timespec t;
-
-       fractional = modf(n, &integral);
-       t.tv_sec = (int) integral;
-       t.tv_nsec = (int) (1E9 * fractional);
-
-       return t;
-}
-
-void
-snooze(struct timespec *t)
-{
-       struct timespec remainder;
-       int result;
-
-       result = nanosleep(t, &remainder);
-
-       if (result < 0) {
-               if (errno == EINTR) {
-                       warn(
-                           "nanosleep interrupted. Remainder: "
-                           "{ tv_sec = %ld, tv_nsec = %ld }",
-                           remainder.tv_sec, remainder.tv_nsec);
-                       /* No big deal if we occasionally sleep less,
-                        * so not attempting to correct after an interruption.
-                        */
-               } else {
-                       fatal("nanosleep: %s\n", strerror(errno));
-               }
-       }
-}
This page took 0.028796 seconds and 4 git commands to generate.