summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-04-22 12:33:29 +0200
committerGünther Deschner <gd@samba.org>2010-04-23 16:06:42 +0200
commit3f1cc29814c62b60a5615bb05c13addd171cc141 (patch)
treec8f6880766aad86805be1d91526de62d1b9c1e73 /source3/lib
parentbb22855af51d27eed1b18b33689f6dc39e09f068 (diff)
downloadsamba-3f1cc29814c62b60a5615bb05c13addd171cc141.tar.gz
samba-3f1cc29814c62b60a5615bb05c13addd171cc141.tar.bz2
samba-3f1cc29814c62b60a5615bb05c13addd171cc141.zip
s3-time: Added a function to get the startup time of the server.
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/time.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index dffc03b1cf..b965479957 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -506,6 +506,19 @@ void get_process_uptime(struct timeval *ret_time)
}
}
+/**
+ * @brief Get the startup time of the server.
+ *
+ * @param[out] ret_time A pointer to a timveal structure to set the startup
+ * time.
+ */
+void get_startup_time(struct timeval *ret_time)
+{
+ ret_time->tv_sec = start_time_hires.tv_sec;
+ ret_time->tv_usec = start_time_hires.tv_usec;
+}
+
+
/****************************************************************************
Convert a NTTIME structure to a time_t.
It's originally in "100ns units".