X-Git-Url: https://git.xandkar.net/?p=khatus.git;a=blobdiff_plain;f=x5%2Fkhatus_sensor_time.c;h=7e16aac892452d13e8915d650d186d2e6d15e240;hp=01483b966392023a26cf1000c3332966e579648b;hb=1084633a90758b15f09bc5ec232c45470cdadc37;hpb=16e0239d76a7de132b20a564cc2c14ff2358ecf2 diff --git a/x5/khatus_sensor_time.c b/x5/khatus_sensor_time.c index 01483b9..7e16aac 100644 --- a/x5/khatus_sensor_time.c +++ b/x5/khatus_sensor_time.c @@ -8,8 +8,8 @@ #include #include -#include "khatus_lib_log.h" -#include "khatus_lib_time.h" +#include "khlib_log.h" +#include "khlib_time.h" #define usage(...) {print_usage(); fprintf(stderr, "Error:\n " __VA_ARGS__); exit(EXIT_FAILURE);} @@ -79,10 +79,10 @@ main(int argc, char **argv) char buf[MAX_LEN]; opt_parse(argc, argv); - ti = timespec_of_float(opt_interval); - debug("opt_fmt: \"%s\"\n", opt_fmt); - debug("opt_interval: %f\n", opt_interval); - debug("ti: {tv_sec = %ld, tv_nsec = %ld}\n", ti.tv_sec, ti.tv_nsec); + ti = khlib_timespec_of_float(opt_interval); + khlib_debug("opt_fmt: \"%s\"\n", opt_fmt); + khlib_debug("opt_interval: %f\n", opt_interval); + khlib_debug("ti: {tv_sec = %ld, tv_nsec = %ld}\n",ti.tv_sec,ti.tv_nsec); memset(buf, '\0', MAX_LEN); signal(SIGPIPE, SIG_IGN); @@ -91,7 +91,7 @@ main(int argc, char **argv) strftime(buf, MAX_LEN, opt_fmt, localtime(&t)); puts(buf); fflush(stdout); - snooze(&ti); + khlib_sleep(&ti); } return EXIT_SUCCESS; }