您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ timer_remove函数代码示例

51自学网 2021-06-03 08:51:29
  C++
这篇教程C++ timer_remove函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中timer_remove函数的典型用法代码示例。如果您正苦于以下问题:C++ timer_remove函数的具体用法?C++ timer_remove怎么用?C++ timer_remove使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了timer_remove函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: rt_table_delete

void rt_table_delete(u_int32_t dest_addr){    rt_table_t *rt_entry, *prev;    hash_value hash;    unsigned int index;    /* Calculate index */    index = hashing(&dest_addr, &hash);    for (prev = NULL, rt_entry = routing_table[index];	 rt_entry != NULL; prev = rt_entry, rt_entry = rt_entry->next) {	if (rt_entry->hash != hash)	    continue;	if (memcmp(&dest_addr, &rt_entry->dest_addr, sizeof(u_int32_t)) == 0) {	    if (prev == NULL)		routing_table[index] = rt_entry->next;	    else		prev->next = rt_entry->next;	    precursor_list_destroy(rt_entry);	    if (rt_entry->hcnt != INFTY)		k_del_rte(dest_addr, 0, 0);	    /* Make sure any timers are removed... */	    timer_remove(&rt_entry->rt_timer);	    timer_remove(&rt_entry->hello_timer);	    timer_remove(&rt_entry->ack_timer);	    free(rt_entry);	    return;	}    }}
开发者ID:joninvski,项目名称:aodvuu-ts7500,代码行数:35,


示例2: rt_table_invalidate

/* Route expiry and Deletion, AODV draft v.9, section 8.13. */int rt_table_invalidate(rt_table_t * rt_entry){#ifdef DEBUG    struct timeval now;    gettimeofday(&now, NULL);#endif        if (rt_entry == NULL)	return -1;#ifdef DEBUG    if(rt_entry->hello_timer.used) 	log(LOG_DEBUG, 0, "route_expire_timeout: last HELLO: %ld", 	    timeval_diff(&now, &rt_entry->last_hello_time) / 1000);#endif    timer_remove(&rt_entry->rt_timer);    timer_remove(&rt_entry->hello_timer);    timer_remove(&rt_entry->ack_timer);    /* Save last hopcount */    rt_entry->last_hcnt = rt_entry->hcnt;    /* Set infinity hop count */    rt_entry->hcnt = INFTY;    /* When the lifetime of a route entry expires, increase the sequence       number for that entry. (AODV draft v.10, section 6.1.) */    rt_entry->dest_seqno++;        rt_entry->flags = 0;        rt_entry->last_life = 0;        if (rt_entry->last_hcnt == 1)	rt_table_remove_precursor(rt_entry->dest_addr);        /* We should delete the precursor list for all unreachable       destinations. */    precursor_list_destroy(rt_entry);        /* Delete kernel routing table entry. */    k_del_rte(rt_entry->dest_addr, 0, 0);    /* Schedule a deletion timer */    rt_entry->rt_timer.handler = route_delete_timeout;    timer_add_msec(&rt_entry->rt_timer, DELETE_PERIOD);#ifdef DEBUG    log(LOG_DEBUG, 0, "rt_table_invalidate: %s removed in %u msecs",	ip_to_str(rt_entry->dest_addr), DELETE_PERIOD);#endif    return 0;}
开发者ID:joninvski,项目名称:aodvuu-ts7500,代码行数:53,


示例3: as_download_free

/* Stop and free download. */void as_download_free (ASDownload *dl){	List *l;	if (!dl)		return;	/* Cancel all active connections. */	stop_all_connections (dl);	/* Make sure any source search is gone */	if (dl->search)		as_searchman_remove (AS->searchman, dl->search);	as_hash_free (dl->hash);	free (dl->path);	if (dl->fp)		fclose (dl->fp);	for (l = dl->conns; l; l = l->next)		as_downconn_free (l->data);	list_free (dl->conns);	for (l = dl->chunks; l; l = l->next)		as_downchunk_free (l->data);	list_free (dl->chunks);	timer_remove (dl->maintenance_timer);	as_meta_free (dl->meta);	free (dl);}
开发者ID:BackupTheBerlios,项目名称:gift-ares,代码行数:33,


示例4: digdug_customio_w

void digdug_customio_w(int offset,int data){if (errorlog && data != 0x10 && data != 0x71) fprintf(errorlog,"%04x: custom IO command %02x/n",cpu_get_pc(),data);	customio_command = data;	switch (data)	{		case 0x10:			if (nmi_timer) timer_remove (nmi_timer);			nmi_timer = 0;			return;		case 0xa1:	/* go into switch mode */			mode = 1;			break;		case 0xc1:		case 0xe1:	/* go into credit mode */			mode = 0;			break;		case 0xb1:	/* status? */			credits = 0;	/* this is a good time to reset the credits counter */			break;	}	nmi_timer = timer_pulse (TIME_IN_USEC (50), 0, digdug_nmi_generate);}
开发者ID:cdrr,项目名称:MAME_hack,代码行数:29,


示例5: nas_timer_stop

/**************************************************************************** **                                                                        ** ** Name:    timer_stop()                                              ** **                                                                        ** ** Description: Stop the timer with the specified identifier              ** **                                                                        ** ** Inputs:  id:        The identifier of the timer to be stopped  ** **      Others:    None                                       ** **                                                                        ** ** Outputs:     None                                                      ** **      Return:    NAS_TIMER_INACTIVE_ID when successfully stop-  ** **             ped; The timer identifier otherwise.       ** **      Others:    None                                       ** **                                                                        ** ***************************************************************************/intnas_timer_stop (  int id){  /*   * Check if the timer entry is active   */  if (_nas_timer_db_is_active (id)) {    nas_timer_entry_t                      *entry;    /*     * Remove the entry from the timer queue     */    entry = _nas_timer_db_remove_entry (id);#if ENABLE_ITTI    timer_remove (entry->timer_id);#else    (void)entry;#endif    /*     * Delete the timer entry     */    _nas_timer_db_delete_entry (id);    return (NAS_TIMER_INACTIVE_ID);  }  return (id);}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:43,


示例6: STATE_POSTLOAD

static STATE_POSTLOAD( timer_postload ){	emu_timer *privlist = NULL;	emu_timer *t;	/* remove all timers and make a private list */	while (timer_head != NULL)	{		t = timer_head;		/* temporary timers go away entirely */		if (t->temporary)			timer_remove(t);		/* permanent ones get added to our private list */		else		{			timer_list_remove(t);			t->next = privlist;			privlist = t;		}	}	/* now add them all back in; this effectively re-sorts them by time */	while (privlist != NULL)	{		t = privlist;		privlist = t->next;		timer_list_insert(t);	}}
开发者ID:cdenix,项目名称:ps3-mame-0125,代码行数:31,


示例7: op_metro_unset_timer

static inline void op_metro_unset_timer(op_metro_t* metro) {  timer_remove(&(metro->timer));  //  timers_unset_custom(&(metro->timer));  //  print_dbg("/r/n op_metro remove timer, return value: ");  //  print_dbg(ret ? "1" : "0");}
开发者ID:Someone101,项目名称:aleph,代码行数:7,


示例8: wave_status

int wave_status(int id, int newstatus){	/* wave status has the following bitfields:	 *	 *	Bit 1:	Mute (1=mute 0=nomute)	 *	Bit 0:	Motor (1=on 0=off)	 *	 *	Also, you can pass -1 to have it simply return the status	 */	struct wave_file *w = &wave[id];	if( !w->file )		return 0;    if( newstatus != -1 )	{		w->mute = newstatus & 2;		newstatus &= 1;		if( newstatus && !w->timer )		{			w->timer = timer_set(TIME_NEVER, 0, NULL);		}		else		if( !newstatus && w->timer )		{			if( w->timer )				w->offset += (((float)timer_timeelapsed(w->timer))/(float)TIME_ONE_SEC) * w->smpfreq;			timer_remove(w->timer);			w->timer = NULL;			bitmap_dirty = 1;		}	}	return (w->timer ? 1 : 0) | (w->mute ? 2 : 0);}
开发者ID:ArnaudFeld,项目名称:MameAppleTV,代码行数:35,


示例9: wave_seek

int wave_seek(int id, int offset, int whence){	struct wave_file *w = &wave[id];    UINT32 pos = 0;	if( !w->file )		return pos;    switch( whence )	{	case SEEK_SET:		w->offset = offset;		break;	case SEEK_END:		w->offset = w->samples - 1;		break;	case SEEK_CUR:		if( w->timer )			pos = w->offset + ((((float)timer_timeelapsed(w->timer))/(float)TIME_ONE_SEC) * w->smpfreq);		w->offset = pos + offset;		if( w->offset < 0 )			w->offset = 0;		if( w->offset >= w->length )			w->offset = w->length - 1;	}	w->playpos = w->offset;    if( w->timer )	{		timer_remove(w->timer);		w->timer = timer_set(TIME_NEVER, 0, NULL);	}    return w->offset;}
开发者ID:ArnaudFeld,项目名称:MameAppleTV,代码行数:35,


示例10: TimerHandler

/* TimerHandler from fm.c */static void TimerHandler(int n,int c,int count,double stepTime){	if( count == 0 )	{	/* Reset FM Timer */		if( Timer[n][c] )		{//			if(errorlog) fprintf(errorlog,"2612 TimerReset %d/n",c);	 		timer_remove (Timer[n][c]);			Timer[n][c] = 0;		}	}	else	{	/* Start FM Timer */		double timeSec = (double)count * stepTime;		if( Timer[n][c] == 0 )		{			double slack;			slack = timer_get_time() - lastfired[n][c];			/* hackish way to make bstars intro sync without */			/* breaking sonicwi2 command 0x35 */			if (slack < 0.000050) slack = 0;//			if(errorlog) fprintf(errorlog,"2612 TimerSet %d %f slack %f/n",c,timeSec,slack);			Timer[n][c] = timer_set (timeSec - slack, (c<<7)|n, timer_callback_2612 );		}	}}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:31,


示例11: seek_list_remove

int seek_list_remove(u_int32_t dest_addr){    seek_list_t *curr, *prev;    curr = seek_list_head;    prev = NULL;    while (curr != NULL) {	if (curr->dest_addr == dest_addr) {	    if (prev == NULL)		seek_list_head = curr->next;	    else		prev->next = curr->next;	    /* Make sure any timers are removed */	    timer_remove(&curr->seek_timer);	    if (curr->ipd)		free(curr->ipd);	    free(curr);	    return 1;	}	prev = curr;	curr = curr->next;    }    return 0;}
开发者ID:joninvski,项目名称:aodvuu-ts7500,代码行数:28,


示例12: rrep_ack_process

voidrrep_ack_process(RREP_ack * rrep_ack, int rrep_acklen, u_int32_t ip_src,		 u_int32_t ip_dst){    rt_table_t *rt_entry;    rt_entry = rt_table_find(ip_src);    if (rt_entry == NULL) {#ifdef DEBUG	log(LOG_WARNING, 0,	    "rrep_ack_process: No RREP_ACK expected for %s",	    ip_to_str(ip_src));#endif	return;    }#ifdef DEBUG    log(LOG_DEBUG, 0, "rrep_ack_process: Received RREP_ACK from %s",	ip_to_str(ip_src));#endif    /* Remove unexpired timer for this RREP_ACK */    if (rt_entry->ack_timer.used)	timer_remove(&rt_entry->ack_timer);}
开发者ID:joninvski,项目名称:aodvuu-ts7500,代码行数:25,


示例13: MACHINE_STOP

static MACHINE_STOP(taito) {	if ( TAITOlocals.timer_irq ) {		timer_remove(TAITOlocals.timer_irq);		TAITOlocals.timer_irq = NULL;	}	if (core_gameData->hw.soundBoard)		sndbrd_0_exit();}
开发者ID:CarnyPriest,项目名称:SAMbuild,代码行数:8,


示例14: pacland_stop_mcu_timer

void pacland_stop_mcu_timer( void ){	if ( pacland_timer )	{		timer_remove( pacland_timer );		pacland_timer = 0;	}}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:8,


示例15: timer_callback_2151

static void timer_callback_2151(int param){	int n=param&0x7f;	int c=param>>7;	timer_remove(Timer[n][c]);	Timer[n][c] = 0;	YM2151TimerOver(n,c);}
开发者ID:albinoz,项目名称:raine,代码行数:9,


示例16: get_currtime

rt_table_t *rt_table_update_timeout(rt_table_t *entry, u_int32_t life) {  entry->expire = get_currtime() + life;  timer_remove(entry->timer_id);#ifdef DEBUG    /*      log(LOG_INFO, 0, "rt_table_update(): New timer for %s, life=%d",  */  /*  	ip_to_str(entry->dest), newlife);  */#endif  entry->timer_id = timer_new(life, route_expire_timeout, entry);  return entry;}
开发者ID:joninvski,项目名称:aodvuu-ts7500,代码行数:10,


示例17: mame_timer_set_global_time

void mame_timer_set_global_time(mame_time newbase){	mame_timer *timer;	/* set the new global offset */	global_basetime = newbase;	LOG(("mame_timer_set_global_time: new=%.9f head->expire=%.9f/n", mame_time_to_double(newbase), mame_time_to_double(timer_head->expire)));	/* now process any timers that are overdue */	while (compare_mame_times(timer_head->expire, global_basetime) <= 0)	{		int was_enabled = timer_head->enabled;		/* if this is a one-shot timer, disable it now */		timer = timer_head;		if (compare_mame_times(timer->period, time_zero) == 0 || compare_mame_times(timer->period, time_never) == 0)			timer->enabled = 0;		/* set the global state of which callback we're in */		callback_timer_modified = 0;		callback_timer = timer;		callback_timer_expire_time = timer->expire;		/* call the callback */		if (was_enabled && timer->callback)		{			LOG(("Timer %s:%d fired (expire=%.9f)/n", timer->file, timer->line, mame_time_to_double(timer->expire)));			profiler_mark(PROFILER_TIMER_CALLBACK);			(*timer->callback)(timer->callback_param);			profiler_mark(PROFILER_END);		}		/* clear the callback timer global */		callback_timer = NULL;		/* reset or remove the timer, but only if it wasn't modified during the callback */		if (!callback_timer_modified)		{			/* if the timer is temporary, remove it now */			if (timer->temporary)				timer_remove(timer);			/* otherwise, reschedule it */			else			{				timer->start = timer->expire;				timer->expire = add_mame_times(timer->expire, timer->period);				timer_list_remove(timer);				timer_list_insert(timer);			}		}	}}
开发者ID:Sunoo,项目名称:nonamemame,代码行数:55,


示例18: rrep_send

void NS_CLASS rrep_send(RREP * rrep, rt_table_t * rev_rt,			rt_table_t * fwd_rt, int size){	u_int8_t rrep_flags = 0;	struct in_addr dest;	if (!rev_rt) {		DEBUG(LOG_WARNING, 0, "Can't send RREP, rev_rt = NULL!");		return;	}	dest.s_addr = rrep->dest_addr;	/* Check if we should request a RREP-ACK */	if ((rev_rt->state == VALID && rev_rt->flags & RT_UNIDIR) ||	    (rev_rt->hcnt == 1 && unidir_hack)) {		rt_table_t *neighbor = rt_table_find(rev_rt->next_hop);		if (neighbor && neighbor->state == VALID		    && !neighbor->ack_timer.used) {			/* If the node we received a RREQ for is a neighbor we are			   probably facing a unidirectional link... Better request a			   RREP-ack */			rrep_flags |= RREP_ACK;			neighbor->flags |= RT_UNIDIR;			/* Must remove any pending hello timeouts when we set the			   RT_UNIDIR flag, else the route may expire after we begin to			   ignore hellos... */			timer_remove(&neighbor->hello_timer);			neighbor_link_break(neighbor);			DEBUG(LOG_DEBUG, 0, "Link to %s is unidirectional!",			      ip_to_str(neighbor->dest_addr));			timer_set_timeout(&neighbor->ack_timer, NEXT_HOP_WAIT);		}	}	DEBUG(LOG_DEBUG, 0, "Sending RREP to next hop %s about %s->%s",	      ip_to_str(rev_rt->next_hop), ip_to_str(rev_rt->dest_addr),	      ip_to_str(dest));	aodv_socket_send((AODV_msg *) rrep, rev_rt->next_hop, size, MAXTTL,			 &DEV_IFINDEX(rev_rt->ifindex));	/* Update precursor lists */	if (fwd_rt) {		precursor_add(fwd_rt, rev_rt->next_hop);		precursor_add(rev_rt, fwd_rt->next_hop);	}	if (!llfeedback && optimized_hellos)		hello_start();}
开发者ID:joninvski,项目名称:aodvuu-ts7500,代码行数:55,


示例19: timer_set_global_time

void timer_set_global_time(attotime newbase){	emu_timer *timer;	/* set the new global offset */	global_basetime = newbase;	LOG(("timer_set_global_time: new=%s head->expire=%s/n", attotime_string(newbase, 9), attotime_string(timer_head->expire, 9)));	/* now process any timers that are overdue */	while (attotime_compare(timer_head->expire, global_basetime) <= 0)	{		int was_enabled = timer_head->enabled;		/* if this is a one-shot timer, disable it now */		timer = timer_head;		if (attotime_compare(timer->period, attotime_zero) == 0 || attotime_compare(timer->period, attotime_never) == 0)			timer->enabled = FALSE;		/* set the global state of which callback we're in */		callback_timer_modified = FALSE;		callback_timer = timer;		callback_timer_expire_time = timer->expire;		/* call the callback */		if (was_enabled && timer->callback != NULL)		{			LOG(("Timer %s:%d[%s] fired (expire=%s)/n", timer->file, timer->line, timer->func, attotime_string(timer->expire, 9)));			profiler_mark(PROFILER_TIMER_CALLBACK);			(*timer->callback)(Machine, timer->ptr, timer->param);			profiler_mark(PROFILER_END);		}		/* clear the callback timer global */		callback_timer = NULL;		/* reset or remove the timer, but only if it wasn't modified during the callback */		if (!callback_timer_modified)		{			/* if the timer is temporary, remove it now */			if (timer->temporary)				timer_remove(timer);			/* otherwise, reschedule it */			else			{				timer->start = timer->expire;				timer->expire = attotime_add(timer->expire, timer->period);				timer_list_remove(timer);				timer_list_insert(timer);			}		}	}}
开发者ID:cdenix,项目名称:ps3-mame-0125,代码行数:55,


示例20: TTL74123_unconfig

void TTL74123_unconfig(void){    int i;    for (i = 0; i < MAX_TTL74123; i++)    {        if (chip[i].timer)  timer_remove(chip[i].timer);    }    memset(&chip, 0, sizeof(chip));}
开发者ID:cdrr,项目名称:MAME_hack,代码行数:11,


示例21: as_sessman_free

/* free manager */void as_sessman_free (ASSessMan *man){	if (!man)		return;	timer_remove (man->maintenance_timer);	/* disconnect everything */	as_sessman_connect (man, 0);	free (man);}
开发者ID:BackupTheBerlios,项目名称:gift-ares,代码行数:13,


示例22: opn_download_free

void opn_download_free(OpnDownload *dl){	if (!dl)		return;	OPENNAP->downloads = list_remove(OPENNAP->downloads, dl);	tcp_close(dl->con);	timer_remove(dl->retry_timer);	opn_url_free(dl->url);	free(dl);}
开发者ID:BackupTheBerlios,项目名称:gift-opennap,代码行数:13,


示例23: timer_handler

static int timer_handler(etimer_t *timer){    unsigned long long missed;        if (read(timer->fd, &missed, sizeof (missed)) == -1)        error("read timer");        if (timer->cb(timer->data))    {        return !timer_remove(timer);    }    return 0;}
开发者ID:WhireCrow,项目名称:shd,代码行数:13,


示例24: s11_sgw_stop_timer_wrapper

staticNwRcT s11_sgw_stop_timer_wrapper(  NwGtpv2cTimerMgrHandleT tmrMgrHandle,  NwGtpv2cTimerHandleT    tmrHandle){  int ret;  long timer_id;  timer_id = (long)tmrHandle;  ret = timer_remove(timer_id); //TODO  return ret == 0 ? NW_OK : NW_FAILURE;}
开发者ID:awesome-security,项目名称:openairinterface5g,代码行数:14,


示例25: VOTRAXSC01_sh_stop

void VOTRAXSC01_sh_stop(void){	if ( votraxsc01_locals.timer )		timer_remove(votraxsc01_locals.timer);	votraxsc01_locals.timer = 0;	if ( votraxsc01_locals.lpBuffer ) {		free(votraxsc01_locals.lpBuffer);		votraxsc01_locals.lpBuffer = NULL;	}#ifdef REAL_DEVICE	DlPortWritePortUshort(_ctrlOutAdr, 0x01);#endif}
开发者ID:Bremma,项目名称:pinmame,代码行数:15,


示例26: opennap_destroy

static void opennap_destroy(Protocol *p){	if (!OPENNAP)		return;	timer_remove(OPENNAP->connect_timer);	config_free(OPENNAP->cfg);	tcp_close(OPENNAP->con);	opn_searches_free(OPENNAP->searches);	opn_sessions_free(OPENNAP->sessions);	opn_nodelist_free(OPENNAP->nodelist);	free(OPENNAP);}
开发者ID:BackupTheBerlios,项目名称:gift-opennap,代码行数:15,


示例27: hello_timeout

/* This is called when we stop receiveing hello messages from a   node. For now this is basically the same as a route timeout. */void hello_timeout(void *arg) {    rt_table_t *rt_entry;    rt_entry = (rt_table_t *)arg;#ifdef DEBUG    log(LOG_DEBUG, 0, "hello_timeout: %s", ip_to_str(rt_entry->dest_addr));#endif    rt_entry->hello_timer_id = 0;    if(rt_entry != NULL) {        timer_remove(rt_entry->timer_id);        route_expire_timeout(rt_entry);    }}
开发者ID:joninvski,项目名称:aodvuu-ts7500,代码行数:17,


示例28: TimerHandler_3812

static void TimerHandler_3812(int c,double period){	if( period == 0 )	{	/* Reset FM Timer */		if( Timer_3812[c] )		{	 		timer_remove(Timer_3812[c]);			Timer_3812[c] = 0;		}	}	else	{	/* Start FM Timer */		Timer_3812[c] = timer_set(period, c, timer_callback_3812 );	}}
开发者ID:dreiss,项目名称:M1-Android,代码行数:15,



注:本文中的timer_remove函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ timer_reset函数代码示例
C++ timer_read函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。