]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - daemon.c
Simplify set_server_start_time().
[paraslash.git] / daemon.c
index 18ad1568fbb5074bbddd60bc99835bb49967d24e..cace3b7874e7a3f00c72b134b59ada6d4978959d 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2013 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2014 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -292,21 +292,14 @@ void drop_privileges_or_die(const char *username, const char *groupname)
 /**
  * Set the server startup time.
  *
- * \param startuptime The value to store as the server start time.
+ * This should be called once on startup. It sets the server start time to the
+ * current time. The stored time is used for retrieving the server uptime.
  *
- * This should be called once on startup with \a startuptime either NULL or a
- * pointer to a struct timeval which contains the current time. If \a
- * startuptime is NULL, the server start time is set to the current time.
- *
- * \sa time(2), difftime(3) \ref get_server_uptime(), \ref
- * get_server_uptime_str().
+ * \sa time(2), \ref get_server_uptime(), \ref get_server_uptime_str().
  */
-void set_server_start_time(const struct timeval *startuptime)
+void set_server_start_time(void)
 {
-       if (startuptime)
-               me->startuptime = startuptime->tv_sec;
-       else
-               time(&me->startuptime);
+       time(&me->startuptime);
 }
 
 /**