1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 17:23:15 +02:00

core: convert "long long" to "unsigned long long" in functions util_get_microseconds_string and util_parse_delay

This commit is contained in:
Sébastien Helleu
2025-03-16 11:13:25 +01:00
parent e8a335a3e3
commit 9fe5fa23a0
8 changed files with 118 additions and 89 deletions
+5 -5
View File
@@ -285,14 +285,14 @@ sys_display_rusage (void)
#ifdef HAVE_SYS_RESOURCE_H
struct rusage usage;
char *str_time;
long long microseconds;
unsigned long long microseconds;
gui_chat_printf (NULL, "");
gui_chat_printf (NULL, _("Resource usage (see \"man getrusage\" for help):"));
getrusage (RUSAGE_SELF, &usage);
/* ru_utime: user CPU time used */
microseconds = ((long long)usage.ru_utime.tv_sec * 1000000)
+ (long long)usage.ru_utime.tv_usec;
microseconds = ((unsigned long long)usage.ru_utime.tv_sec * 1000000)
+ (unsigned long long)usage.ru_utime.tv_usec;
str_time = util_get_microseconds_string (microseconds);
if (str_time)
{
@@ -300,8 +300,8 @@ sys_display_rusage (void)
free (str_time);
}
/* ru_stime: system CPU time used */
microseconds = ((long long)usage.ru_stime.tv_sec * 1000000)
+ (long long)usage.ru_stime.tv_usec;
microseconds = ((unsigned long long)usage.ru_stime.tv_sec * 1000000)
+ (unsigned long long)usage.ru_stime.tv_usec;
str_time = util_get_microseconds_string (microseconds);
if (str_time)
{