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

            return(0);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 4
0
        //-------------------------------------------------------------------------
        // 修改一个时间事件的时间
        public int modTimer(EbTimeEvent time_event, ulong expires)
        {
            delTimer(time_event);
            time_event.mExpires = expires;
            addTimer(time_event);

            return 0;
        }
Esempio n. 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;
        }
Esempio n. 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);
        }