mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
display-time option to set message display time.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: server-fn.c,v 1.46 2008-06-19 23:07:11 nicm Exp $ */
|
||||
/* $Id: server-fn.c,v 1.47 2008-06-19 23:20:45 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -26,7 +26,12 @@
|
||||
void
|
||||
server_set_client_message(struct client *c, const char *msg)
|
||||
{
|
||||
struct timespec ts = { 0, 750000000L };
|
||||
struct timespec ts;
|
||||
int delay;
|
||||
|
||||
delay = options_get_number(&c->session->options, "display-time");
|
||||
ts.tv_sec = delay / 1000;
|
||||
ts.tv_nsec = (delay % 1000) * 1000000L;
|
||||
|
||||
c->message_string = xstrdup(msg);
|
||||
if (clock_gettime(CLOCK_REALTIME, &c->message_timer) != 0)
|
||||
|
Reference in New Issue
Block a user