Skip to content

Commit

Permalink
Remove g_time2() call
Browse files Browse the repository at this point in the history
This is currently unused in xrdp
  • Loading branch information
matt335672 committed Dec 4, 2024
1 parent 78bc949 commit 67c7ee1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
17 changes: 0 additions & 17 deletions common/os_calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 0 additions & 1 deletion common/os_calls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions sesman/chansrv/xcommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 67c7ee1

Please sign in to comment.