Example #1
0
        //-------------------------------------------------------------------------
        // 修改一个时间事件的时间
        public int modTimer(EbTimeEvent time_event, ulong expires)
        {
            delTimer(time_event);
            time_event.mExpires = expires;
            addTimer(time_event);

            return(0);
        }
Example #2
0
        //-------------------------------------------------------------------------
        // 添加一个时间事件
        public void addTimer(EbTimeEvent time_event)
        {
            EbDoubleLinkNode <EbTimeEvent> timer_node = new EbDoubleLinkNode <EbTimeEvent>();

            timer_node.mObject = time_event;

            mMapEventNode[time_event] = timer_node;

            _addTimer(timer_node);
        }
Example #3
0
        //-------------------------------------------------------------------------
        // 删除一个时间事件
        public int delTimer(EbTimeEvent time_event)
        {
            if (mMapEventNode.ContainsKey(time_event))
            {
                EbDoubleLinkNode <EbTimeEvent> timer_node = mMapEventNode[time_event];

                _delTimer(timer_node);
            }

            return(0);
        }
Example #4
0
        //-------------------------------------------------------------------------
        // 修改一个时间事件的时间
        public int modTimer(EbTimeEvent time_event, ulong expires)
        {
            delTimer(time_event);
            time_event.mExpires = expires;
            addTimer(time_event);

            return 0;
        }
Example #5
0
        //-------------------------------------------------------------------------
        // 删除一个时间事件
        public int delTimer(EbTimeEvent time_event)
        {
            if (mMapEventNode.ContainsKey(time_event))
            {
                EbDoubleLinkNode<EbTimeEvent> timer_node = mMapEventNode[time_event];

                _delTimer(timer_node);
            }

            return 0;
        }
Example #6
0
        //-------------------------------------------------------------------------
        // 添加一个时间事件
        public void addTimer(EbTimeEvent time_event)
        {
            EbDoubleLinkNode<EbTimeEvent> timer_node = new EbDoubleLinkNode<EbTimeEvent>();
            timer_node.mObject = time_event;

            mMapEventNode[time_event] = timer_node;

            _addTimer(timer_node);
        }