From 67c7ee1a264e07b0d5781885022ee593f6461894 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:21:09 +0000 Subject: [PATCH] Remove g_time2() call This is currently unused in xrdp --- common/os_calls.c | 17 ----------------- common/os_calls.h | 1 - sesman/chansrv/xcommon.c | 4 +--- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/common/os_calls.c b/common/os_calls.c index d81cf0f126..5d65fd4caf 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -3763,23 +3763,6 @@ g_check_user_in_group(const char *username, int gid, int *ok) } #endif // HAVE_GETGROUPLIST -/*****************************************************************************/ -/* returns the number of milliseconds since the machine was - started. */ -int -g_time2(void) -{ -#if defined(_WIN32) - return (int)GetTickCount(); -#else - struct tms tm; - clock_t num_ticks = 0; - g_memset(&tm, 0, sizeof(struct tms)); - num_ticks = times(&tm); - return (int)(num_ticks * 10); -#endif -} - /*****************************************************************************/ /* returns time in milliseconds, uses gettimeofday does not work in win32 */ diff --git a/common/os_calls.h b/common/os_calls.h index 8de07bf356..0ef5cdba06 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -393,7 +393,6 @@ int g_getgroup_info(const char *groupname, int *gid); * Primary group of username is also checked */ int g_check_user_in_group(const char *username, int gid, int *ok); -int g_time2(void); int g_time3(void); int g_save_to_bmp(const char *filename, char *data, int stride_bytes, int width, int height, int depth, int bits_per_pixel); diff --git a/sesman/chansrv/xcommon.c b/sesman/chansrv/xcommon.c index 2e444e76cc..5655176772 100644 --- a/sesman/chansrv/xcommon.c +++ b/sesman/chansrv/xcommon.c @@ -86,9 +86,7 @@ xcommon_fatal_handler(Display *dis) } /*****************************************************************************/ -/* returns time in milliseconds - this is like g_time2 in os_calls, but not milliseconds since machine was - up, something else +/* returns time in milliseconds since a point in the past this is a time value similar to what the xserver uses */ int xcommon_get_local_time(void)