mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
remove GTimeVal following glib 2.61.2 deprecation
This commit is contained in:
parent
4c5f708b9b
commit
1cdb4bc311
14 changed files with 74 additions and 69 deletions
|
|
@ -65,7 +65,7 @@ int command_hide_output;
|
|||
the line had one or two command chars, and which one.. */
|
||||
static const char *current_cmdline;
|
||||
|
||||
static GTimeVal time_command_last, time_command_now;
|
||||
static gint64 time_command_last, time_command_now;
|
||||
static int last_command_cmd, command_cmd;
|
||||
|
||||
/* SYNTAX: ECHO [-window <name>] [-level <level>] <text> */
|
||||
|
|
@ -222,7 +222,7 @@ static void event_command(const char *data)
|
|||
time_command_last = time_command_now;
|
||||
last_command_cmd = command_cmd;
|
||||
|
||||
g_get_current_time(&time_command_now);
|
||||
time_command_now = g_get_real_time();
|
||||
command_cmd = *data != '\0' &&
|
||||
strchr(settings_get_str("cmdchars"), *data) != NULL;
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ static void event_default_command(const char *data, void *server,
|
|||
|
||||
/* maybe we're copy+pasting text? check how long it was since the
|
||||
last line */
|
||||
diff = get_timeval_diff(&time_command_now, &time_command_last);
|
||||
diff = time_command_now - time_command_last;
|
||||
if (item != NULL && !last_command_cmd && diff < PASTE_CHECK_SPEED) {
|
||||
signal_emit("send text", 3, current_cmdline, active_win->active_server, active_win->active);
|
||||
command_cmd = FALSE;
|
||||
|
|
@ -334,7 +334,7 @@ void fe_core_commands_init(void)
|
|||
command_hide_output = 0;
|
||||
|
||||
command_cmd = FALSE;
|
||||
memset(&time_command_now, 0, sizeof(GTimeVal));
|
||||
time_command_now = 0;
|
||||
|
||||
command_bind("echo", NULL, (SIGNAL_FUNC) cmd_echo);
|
||||
command_bind("version", NULL, (SIGNAL_FUNC) cmd_version);
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ static void sig_server_lag_disconnected(SERVER_REC *server)
|
|||
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
TXT_LAG_DISCONNECTED, server->connrec->address,
|
||||
time(NULL)-server->lag_sent.tv_sec);
|
||||
time(NULL)-(server->lag_sent / G_TIME_SPAN_SECOND));
|
||||
}
|
||||
|
||||
static void sig_server_reconnect_removed(RECONNECT_REC *reconnect)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue