display-time option to set message display time.

This commit is contained in:
Nicholas Marriott
2008-06-19 23:20:45 +00:00
parent 7cebf4768b
commit a1db273dc2
4 changed files with 30 additions and 5 deletions

View File

@ -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)