X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=daemon.c;h=666b0a5c645cbc0f34b3347a3e021355a6444193;hp=46eb8f19196acfe37f280eb6650223437acdbf1b;hb=7c11e1acf8efc93b36fcae77c3f0ce04ae491c23;hpb=d42af6d28fa44d085b048cb064e20c79189b88b2 diff --git a/daemon.c b/daemon.c index 46eb8f19..666b0a5c 100644 --- a/daemon.c +++ b/daemon.c @@ -1,19 +1,7 @@ /* * Copyright (C) 1997-2006 Andre Noll * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file daemon.c some helpers for programs that detach from the console */ @@ -171,13 +159,15 @@ time_t server_uptime(enum uptime set_or_get) { static time_t startuptime; time_t now; + double diff; if (set_or_get == UPTIME_SET) { time(&startuptime); return 0; } time(&now); - return (time_t) difftime(now, startuptime); + diff = difftime(now, startuptime); + return (time_t) diff; } /**