Welcome! Log In Create A New Profile

Advanced

Re: how to set timer?

July 22, 2009 04:22AM
////////////////////////////////////////////////////////////////////////////////////////////////////////////
static ngx_event_t gdrive_timer_wev;
static ngx_connection_t dumb;

ngx_int_t ngx_http_gdrive_init_process(ngx_cycle_t *cycle)
{
ngx_log_error(NGX_LOG_DEBUG, cycle->log, 0, "set gdrive timer");
gdrive_timer_wev.handler=test_timer;
gdrive_timer_wev.log=cycle->log;
gdrive_timer_wev.data=&dumb;
dumb.fd=(ngx_socket_t)-1;
ngx_add_timer(&gdrive_timer_wev, 5000);
return NGX_OK;
}

static
void test_timer(ngx_event_t *wev)
{
ngx_log_error(NGX_LOG_DEBUG, wev->log, 0, "gdrive timer out");
//printf("print time out\n");
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////


why this doesn't work?
Subject Author Posted

how to set timer?

supergui July 21, 2009 02:25AM

Re: how to set timer?

supergui July 22, 2009 04:21AM

Re: how to set timer?

Brice Figureau July 22, 2009 03:21PM

Re: how to set timer?

vickyma June 16, 2014 09:43PM

Re: how to set timer?

supergui July 22, 2009 04:22AM

Re: how to set timer?

prkumar June 19, 2014 01:37AM

Re: how to set timer?

supergui July 24, 2009 02:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 100
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready