mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3-time: Added a function to get the startup time of the server.
Signed-off-by: Günther Deschner <gd@samba.org>
This commit is contained in:
parent
bb22855af5
commit
3f1cc29814
@ -1087,6 +1087,7 @@ time_t cli_make_unix_date2(struct cli_state *cli, const void *date_ptr);
|
||||
time_t cli_make_unix_date3(struct cli_state *cli, const void *date_ptr);
|
||||
void TimeInit(void);
|
||||
void get_process_uptime(struct timeval *ret_time);
|
||||
void get_startup_time(struct timeval *ret_time);
|
||||
time_t nt_time_to_unix_abs(const NTTIME *nt);
|
||||
time_t uint64s_nt_time_to_unix_abs(const uint64_t *src);
|
||||
void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts);
|
||||
|
@ -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".
|
||||
|
Loading…
Reference in New Issue
Block a user