X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=daemon.c;h=18ad1568fbb5074bbddd60bc99835bb49967d24e;hp=c47aa954fd8a1bfc94cd3a3c379500ddc8a22a93;hb=24758c5f;hpb=1cefe6a503c74d609db4e99e689d46575a5e40fd;ds=sidebyside diff --git a/daemon.c b/daemon.c index c47aa954..18ad1568 100644 --- a/daemon.c +++ b/daemon.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2012 Andre Noll + * Copyright (C) 1997-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -10,7 +10,6 @@ #include #include /* getgrnam() */ #include -#include #include #include "para.h" @@ -65,8 +64,6 @@ void daemon_set_default_log_colors(void) * \param arg The loglevel/color specifier. * * \a arg must be of the form "ll:[fg [bg]] [attr]". - * - * \return 1 On success, -1 on errors. */ void daemon_set_log_color_or_die(char const *arg) { @@ -376,7 +373,7 @@ __printf_2_3 void daemon_log(int ll, const char* fmt,...) fprintf(fp, "%s", color); if (log_time || log_timing) { struct timeval tv; - gettimeofday(&tv, NULL); + clock_get_realtime(&tv); if (daemon_test_flag(DF_LOG_TIME)) { /* print date and time */ time_t t1 = tv.tv_sec; char str[100];