//constructor with both thicks and interval in seconds public Timer(int count, int interval, TimerEvent TE) { this.Count = count; this.Interval = interval; this.tE = TE; this.ticks = 0; }
// Constructor with two arguments => ticks and interval in seconds public Timer(int count, int interval, TimerEvent timerEvent) { this.Count = count; this.Interval = interval; this.Ticks = 0; this.timerEvent = timerEvent; }
public Event(IEventTimer timer, string name = null, TimerEvent body = null, TimeSpan? interval = null, IConfigSectionNode config = null) : base(timer) { if ((timer as IEventTimerImplementation) == null) throw new TimeException(StringConsts.ARGUMENT_ERROR + "Event.ctor(timer=null | timer!=IEventTimerImplementation)"); m_Timer = timer; if (body!=null) Body += body; if (interval.HasValue) m_Interval = interval.Value; if (config!=null) { Configure(config); m_Name = config.AttrByName(Configuration.CONFIG_NAME_ATTR).Value; } if (name.IsNotNullOrWhiteSpace()) m_Name = name; if (m_Name.IsNullOrWhiteSpace()) m_Name = Guid.NewGuid().ToString(); ((IEventTimerImplementation)timer).__InternalRegisterEvent(this); }
public static int NextFrame(TimerEvent callback) { return Add(new TimerInfo { Event = () => { callback(); return true; } }); }
/// <summary> /// Creates a countdown timer on a GameObject. /// </summary> /// <param name="gameObject">The game object to add the timer to.</param> /// <param name="interval">How long the timer will run for.</param> /// <param name="id">ID of the timer.</param> /// <param name="timerEvent">The function to call when the timer runs out.</param> public static CountdownTimer CreateTimer(GameObject gameObject, float interval, string id, TimerEvent timerEvent) { CountdownTimer timer = gameObject.AddComponent<CountdownTimer>(); timer.Initialize(interval, id); timer.TimeOut += new CountdownTimer.TimerEvent(timerEvent); return timer; }
public static int After(float seconds, TimerEvent callback) { return Add(new TimerInfo { Event = () => { callback(); return true; }, Time = seconds }); }
public TimerThread(TimerEvent timerHandler, object context = null, int periodMS = 1000) { m_ExitEvent = new AutoResetEvent(false); m_CompletionEvent = new AutoResetEvent(false); TimerHandler += timerHandler; m_PeriodMS = periodMS; m_Thread = new Thread(Run); m_Thread.Start(context); }
public void SetTimer(TimeSpan after, TimerEvent te) { TimerEventStruct evs = new TimerEventStruct(); evs.time = after + elapsedTotal; evs.ev += te; for (int i = 0; i < events.Count; i++) if (events[i].time == (after + elapsedTotal)) { events[i].ev += te; return; } events.Add(evs); }
public static void Main() { TimerEvent te1 = new TimerEvent(ExecuteEach3Seconds); Timer tm1 = new Timer(3, te1); TimerEvent te2 = new TimerEvent(SecondExecuteEach5Seconds); Timer tm2 = new Timer(5, te2); Timer tm3 = new Timer(new TimerEvent(delegate() { Console.WriteLine("One"); })); Thread timer1Thread = new Thread(new ThreadStart(tm1.Run)); timer1Thread.Start(); Thread timer2Thread = new Thread(new ThreadStart(tm2.Run)); timer2Thread.Start(); Thread timer3Thread = new Thread(new ThreadStart(tm3.Run)); timer3Thread.Start(); }
/// <summary> /// 添加一个Timer /// </summary> /// <param name="l_spaceTime">间隔时间</param> /// <param name="l_isIgnoreTimeScale">是否忽略时间缩放</param> /// <param name="l_callBackCount">重复调用的次数</param> /// <param name="l_timerName">Timer的名字</param> /// <param name="l_callBack">回调函数</param> /// <param name="l_objs">回调函数的参数</param> /// <returns></returns> public static TimerEvent AddTimer(float l_spaceTime, bool l_isIgnoreTimeScale, int l_callBackCount, string l_timerName,TimerCallBack l_callBack, params object[] l_objs) { TimerEvent l_te = new TimerEvent(); l_te.m_timerName = l_timerName; l_te.m_currentTimer = 0; l_te.m_timerSpace = l_spaceTime; l_te.m_callBack = l_callBack; l_te.m_objs = l_objs; l_te.m_isIgnoreTimeScale = l_isIgnoreTimeScale; l_te.m_repeatCount = l_callBackCount; s_Instance.m_timers.Add(l_te); return l_te; }
string stringForZombieEvent(TimerEvent timerEvent) { switch (timerEvent) { case TimerEvent.BadProgramming: return("Bad programming! Too much memory used! (8MB)"); case TimerEvent.AlmostInfiniteLoop: return("An infinite loop broke out! (15MB)"); case TimerEvent.Leak: return("Memory leak! (3MB)"); case TimerEvent.LogicBomb: return("A logic bomb went off in your code! (4MB)"); case TimerEvent.OverRetain: return("An object was retained too many times (6MB)"); case TimerEvent.StagnantReleasePool: return("Your release pools stopped draining! (23MB)"); } return(""); }
public PublishEventJob(RabbitMqEventBus bus, TimerEvent @event) { _bus = bus; _event = @event; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TimerEvent obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }
string stringForZombieEvent (TimerEvent timerEvent) { switch (timerEvent) { case TimerEvent.BadProgramming: return "Bad programming! Too much memory used! (8MB)"; case TimerEvent.AlmostInfiniteLoop: return "An infinite loop broke out! (15MB)"; case TimerEvent.Leak: return "Memory leak! (3MB)"; case TimerEvent.LogicBomb: return "A logic bomb went off in your code! (4MB)"; case TimerEvent.OverRetain: return "An object was retained too many times (6MB)"; case TimerEvent.StagnantReleasePool: return "Your release pools stopped draining! (23MB)"; } return ""; }
/// <summary> /// Creates a countdown timer on a GameObject. /// </summary> /// <param name="gameObject">The game object to add the timer to.</param> /// <param name="interval">How long the timer will run for.</param> /// <param name="id">ID of the timer.</param> /// <param name="timerEvent">The function to call when the timer runs out.</param> public static CountdownTimer CreateTimer(GameObject gameObject, float interval, string id, TimerEvent timerEvent) { CountdownTimer timer = gameObject.AddComponent <CountdownTimer>(); timer.Initialize(interval, id); timer.TimeOut += new CountdownTimer.TimerEvent(timerEvent); return(timer); }
public static void After(float time, TimerEvent callback) { timers.Add(new TimerInfo { Event = () => { callback(); return(true); }, Time = time }); }
//constructor with only interval in seconds and max thicks public Timer(int interval, TimerEvent TE) : this(int.MaxValue, interval, TE) { }
void Remove(TimerEvent timerEvent) { _timerEventList.Remove(timerEvent); WorldManager.Instance.PoolMgr.Release(timerEvent); }
public static void ResetTimer(TimerEvent l_timer) { if(s_instance.m_timers.Contains(l_timer)) { l_timer.ResetTimer(); } else { Debug.LogError("Timer ResetTimer error: dont exist timer "+ l_timer); } }
public static void DestroyTimer(TimerEvent l_timer) { if(s_instance.m_timers.Contains(l_timer)) { s_instance.m_timers.Remove(l_timer); } else { Debug.LogError("Timer DestroyTimer error: dont exist timer " + l_timer); } }
public void EventManager(TimerEvent timerEvent) { if(timerEvent != null) { switch (timerEvent.Type) { case EventType.BombExplode: var b = (Bomb)timerEvent.InvolvedObject; if (TheCurrentMap.GetBomb(b.X, b.Y) != null) { switch(b.Type) { case BombType.Normal: b.Explode(this); break; case BombType.Cataclysm: b.ExplodeCata(this); break; case BombType.Flower: b.ExplodeFlower(this); break; case BombType.Freeze: b.ExplodeFreeze(this); break; case BombType.Dark: b.ExplodeDark(this); break; default: b.Explode(this); break; } } break; case EventType.BombMove: var be = (Bomb)timerEvent.InvolvedObject; if (!be.Move()) { timerEvent.Timer.Stop(); } break; case EventType.BombTeleport: var bo = (Bomb)timerEvent.InvolvedObject; if (TheCurrentMap.GetBomb(bo.X, bo.Y) != null) { var bt = bo.Teleport(TheCurrentMap); if(!bt) { timerEvent.Timer.AutoReset = false; } }else { timerEvent.Timer.AutoReset = false; } break; case EventType.BombReturns: var br = (Bomb)timerEvent.InvolvedObject; Texture._.Mw.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => br.Opacity = 1)); TimerManager._.AddNewTimer(true, 15, true, null, br.LandBomb); break; case EventType.Malediction: var p = (Player)timerEvent.InvolvedObject; p.InvertedDirections = false; p.changeFace(Texture._.TypetextureList[Texture._.GetTextureKey(p)]); break; } } }
public void OnCDTimerEnd(TimerEvent timerEvent) { mCDTimeList.Remove((uint)timerEvent.param); }
public int Schedule(TimerEvent task,long delay) { return Schedulemms(task,delay*1000*1000); }
protected void Init(float setTime, TimerEvent eventFunction, int loops, bool startTimer) { SET_TIME = setTime; timer = SET_TIME; SET_LOOPS = loops; loopCount = SET_LOOPS; timerEvent = eventFunction; running = false; if (startTimer) Start(); }
//CONSTRUCTORS //default constructor public Timer(TimerEvent TE) : this(int.MaxValue, 1, TE) { }
public Timer(float setTime, TimerEvent eventFunction) { Init(setTime, eventFunction, 1, false); }
private void ProcessTimeEvent(TimerEvent theEvent) { if (theEvent is TimerControlEvent) { var tce = (TimerControlEvent)theEvent; if (tce.ClockType == TimerControlEvent.ClockTypeEnum.CLOCK_INTERNAL) { Log.Warn("Timer control events are not processed by the isolated runtime as the setting is always external timer."); } return; } // Evaluation of all time events is protected from statement management if ((ExecutionPathDebugLog.IsEnabled) && (Log.IsDebugEnabled) && (ExecutionPathDebugLog.IsTimerDebugEnabled)) { Log.Debug(".processTimeEvent Setting time and evaluating schedules"); } long currentTime; if (theEvent is CurrentTimeEvent) { var current = (CurrentTimeEvent)theEvent; currentTime = current.Time; if (currentTime == _services.SchedulingService.Time) { Log.Warn("Duplicate time event received for currentTime {0}", currentTime); } _services.SchedulingService.Time = currentTime; ProcessSchedule(); // Let listeners know of results Dispatch(); // Work off the event queue if any events accumulated in there via a route() ProcessThreadWorkQueue(); return; } // handle time span var span = (CurrentTimeSpanEvent)theEvent; var targetTime = span.TargetTime; var optionalResolution = span.OptionalResolution; currentTime = _services.SchedulingService.Time; if (targetTime < currentTime) { Log.Warn("Past or current time event received for currentTime {0}", targetTime); } // Evaluation of all time events is protected from statement management if ((ExecutionPathDebugLog.IsEnabled) && (Log.IsDebugEnabled) && (ExecutionPathDebugLog.IsTimerDebugEnabled)) { Log.Debug(".processTimeEvent Setting time span and evaluating schedules for time " + targetTime + " optional resolution " + span.OptionalResolution); } while (currentTime < targetTime) { if ((optionalResolution != null) && (optionalResolution > 0)) { currentTime += optionalResolution.Value; } else { var nearest = _services.SchedulingService.NearestTimeHandle; if (nearest == null) { currentTime = targetTime; } else { currentTime = nearest.Value; } } if (currentTime > targetTime) { currentTime = targetTime; } // Evaluation of all time events is protected from statement management if ((ExecutionPathDebugLog.IsEnabled) && (Log.IsDebugEnabled) && (ExecutionPathDebugLog.IsTimerDebugEnabled)) { Log.Debug(".processTimeEvent Setting time and evaluating schedules for time " + currentTime); } _services.SchedulingService.Time = currentTime; ProcessSchedule(); // Let listeners know of results Dispatch(); // Work off the event queue if any events accumulated in there via a route() ProcessThreadWorkQueue(); } }
public Timer(float setTime, TimerEvent eventFunction, bool startTimer) { Init(setTime, eventFunction, 1, startTimer); }
public Timer(float d, TimerEvent e, string name) { duration = d; onFire = e; timerName = name; }
public Timer(float setTime, TimerEvent eventFunction, int loops, bool startTimer) { Init(setTime, eventFunction, loops, startTimer); }
/** * Verifies that the {@code timerEvent}'s state is {@link State#START}. * * @param timerEvent the {@link TimerEvent} to verify */ private void VerifyStartState(TimerEvent timerEvent) { Assert.AreEqual(State.START, timerEvent.GetState()); Assert.AreEqual(Duration.Zero, timerEvent.GetDuration()); Assert.AreEqual(Duration.Zero, timerEvent.GetElapsed()); }
public void SetEventFunction(TimerEvent eventFunction) { timerEvent = eventFunction; }
public UserTimer2(TimerEvent newEv) { newEv.StopTimer+= TimerStart2; }
/// <summary> /// Creates a repetition timer on a GameObject. /// </summary> /// <param name="gameObject">The game object to add the timer to.</param> /// <param name="interval">How long the timer will run for.</param> /// <param name="id">ID of the timer.</param> /// <param name="timerEvent">The function to call when the timer runs out.</param> public static void CreateTimer(GameObject gameObject, float interval, string id, TimerEvent timerEvent) { RepetitionTimer timer = gameObject.AddComponent<RepetitionTimer>(); timer.Initialize(interval, id); timer.TimeOut += new RepetitionTimer.TimerEvent(timerEvent); }
private void Start() { zombie.GetComponent <HealthSystem>().health = 6; zombie.GetComponent <AILerp>().speed = 2; increase = GameObject.FindGameObjectWithTag("Round Controller").GetComponent <TimerEvent>(); }
float zombieFactorForEvent (TimerEvent timerEvent) { switch (timerEvent) { case TimerEvent.BadProgramming: return .08f; case TimerEvent.AlmostInfiniteLoop: return .15f; case TimerEvent.Leak: return .03f; case TimerEvent.LogicBomb: return .04f; case TimerEvent.OverRetain: return .06f; case TimerEvent.StagnantReleasePool: return .23f; default: return 0.0f; } }
public Timer(byte ticks, int secs, TimerEvent tE) { this.Ticks = ticks; this.Interval = secs; this.Event = tE; }
/// <summary> /// Creates a timed event which, when disposed, adds to the total time of that event type. /// </summary> /// <param name="e">The type of event</param> /// <returns>A timed event</returns> public static TimedEvent Time(TimerEvent e) { EnsureValid(); return(new TimedEvent(_state.Watch.ElapsedTicks, e)); }
/// <summary> /// 微秒级的时间 /// </summary> /// <param name="task"></param> /// <param name="delay"></param> /// <returns></returns> private int Schedulemms(TimerEvent task, long delay) { lock (missions) { int id = AddIndex; TimerTaskModel model = new TimerTaskModel(id,DateTime.Now.Ticks + delay,task); missions.Add(id,model); return id; } }
public void OnCDTimerEnd(TimerEvent timerEvent) { mItemCdList.Remove((int)timerEvent.param); }
public int Schedule(TimerEvent task, DateTime time) { long t = time.Ticks - DateTime.Now.Ticks; t = Math.Abs(t); return Schedulemms(task,t); }
public override void OnInitGeometry() { var rbCmp = Arena.Owner.RigidBodyCmp; float width = ConvertUnits.ToSimUnits(Arena.ArenaHalfSize.X); float height = ConvertUnits.ToSimUnits(Arena.ArenaHalfSize.Y); float goalWidth = ConvertUnits.ToSimUnits(100); float goalHeight = ConvertUnits.ToSimUnits(80); rbCmp.Body.CollidesWith = (Category)CollisionType.All | (Category)CollisionType.Ball; rbCmp.Body.CollisionCategories = (Category)CollisionType.Wall; m_mobileObjs = new GameObject[2]; for (int i = 0; i < m_mobileObjs.Length; i++) { m_mobileObjs[i] = new GameObject("Arena Mobile Object"); Sprite mobileObjAOSprite = Sprite.CreateFromTexture("Arenas/ArenaMobLarge/AOMob.png"); mobileObjAOSprite.Scale = 0.5f * Vector2.One; ColorMaskedSprite mobileObjColorSprite = new ColorMaskedSprite(mobileObjAOSprite, "ArenaOverlay3"); var texAsset = Engine.AssetManager.GetAsset <Texture2D>("Arenas/ArenaMobLarge/materialMob" + i + ".png"); mobileObjColorSprite.Mask = texAsset.Content; mobileObjColorSprite.Color1 = Arena.ColorScheme.Color2; mobileObjColorSprite.Color2 = Ball.Game.GameManager.Teams[i].ColorScheme.Color1.SetSaturation(0.5f); //mettre en public depuis Arena mobileObjColorSprite.Color3 = Ball.Game.GameManager.Teams[i].ColorScheme.Color1.SetSaturation(0.5f); m_mobileObjs[i].Attach(mobileObjColorSprite); Asset <Texture2D> textureAsset = Engine.AssetManager.GetAsset <Texture2D>("Arenas/ArenaMobLarge/collisionMob.png"); CollisionDefinition collisionDefinition = CollisionDefinitionHelper.FromTexture(textureAsset.Content, 2.0f); for (int iCol = 0; iCol < collisionDefinition.Entries.Length; iCol++) { Engine.Log.Write(String.Format("Collision {0}: {1} vertices", iCol, collisionDefinition.Entries[iCol].Vertices.Length)); } RigidBodyComponentParameters parameters = new RigidBodyComponentParameters { Collision = collisionDefinition }; RigidBodyComponent rigidBodyCmp = new RigidBodyComponent(new Asset <RigidBodyComponentParameters>(parameters)); m_mobileObjs[i].Attach(rigidBodyCmp); m_mobileObjs[i].RigidBodyCmp.Body.CollidesWith = (Category)CollisionType.Player | (Category)CollisionType.Ball; m_mobileObjs[i].RigidBodyCmp.Body.CollisionCategories = (Category)CollisionType.Wall; } m_mobileObjs[0].Position = new Vector2(-mobileObjsPosX, 0); m_mobileObjs[1].Position = new Vector2(mobileObjsPosX, 0); m_mobileObjs[0].Orientation = 0; m_mobileObjs[1].Orientation = 0; Engine.World.EventManager.AddListener((int)EventId.FirstPeriod, OnFirstPeriod); Engine.World.EventManager.AddListener((int)EventId.HalfTime, OnHalfTime); Engine.World.EventManager.AddListener((int)EventId.HalfTimeTransition, OnHalfTimeTransition); Engine.World.EventManager.AddListener((int)EventId.SecondPeriod, OnSecondPeriod); Engine.World.EventManager.AddListener((int)EventId.MatchEnd, OnMatchEnd); m_rotateTimer = new Timer(Engine.GameTime.Source, m_timeFirstMS, TimerBehaviour.Restart); m_rotateTimerEvent = new TimerEvent(StartRotation); m_rotateTimer.OnTime += m_rotateTimerEvent; }
// Empty constructor with interval value = 1 second and ticks value = int.MaxValue public Timer(TimerEvent timerEvent) : this(int.MaxValue, 1, timerEvent) { }
/// <summary> /// Creates an active timer with a certain delay. /// Doesn't add this to the global queue. /// </param> public Timer(int millis, TimerEvent te) : this(millis, te, false) { }
public bool PPGEvent(Context in_ctxt) { try { PPGEventContext ppgctxt = (PPGEventContext)in_ctxt; siPPGEventID eventID = ppgctxt.EventID; if (eventID == siPPGEventID.siParameterChange) { // The Source of the event is the parameter itself Parameter changed = (Parameter)ppgctxt.Source; if ("ProcessReqTimer" == changed.ScriptName) { int interval = (int)changed.GetValue2(null); TimerEvent evTimer = (TimerEvent)GetXSI().EventInfos["sIBL_GUI_XSI_Server_ProcessRequestsTimerEvent"]; evTimer.Reset(interval, 0); } else if ("EnableRequests" == changed.ScriptName) { bool bValue = (bool)changed.GetValue2(null); EventInfo evTimer = GetXSI().EventInfos["sIBL_GUI_XSI_Server_ProcessRequestsTimerEvent"]; evTimer.Mute = bValue == false; } } else if (eventID == siPPGEventID.siButtonClicked) { String buttonPressed = (String)ppgctxt.GetAttribute("Button"); if (buttonPressed == "GetHostAddress") { // Set host param with this host address IPHostEntry hostEntry = Dns.GetHostEntry(Dns.GetHostName()); IPAddress[] ipAddresses = hostEntry.AddressList; Property prop = (Property)ppgctxt.Source; Parameter adr = prop.Parameters["Address"]; adr.PutValue2(null, ipAddresses[0].ToString()); } else if (buttonPressed == "GetLocalHostAddress") { // Set host param with this host address Property prop = (Property)ppgctxt.Source; Parameter adr = prop.Parameters["Address"]; adr.PutValue2(null, "127.0.0.1"); } else if (buttonPressed == "LogRequests") { Info("Logging all requests ..."); ClientRequests requests = new ClientRequests(); requests.Log(); } else if (buttonPressed == "ClearRequests") { Info("Removing all requests ..."); ClientRequests requests = new ClientRequests(); requests.Clear(); } else if (buttonPressed == "StartServer" || buttonPressed == "StopServer") { TimerEvent evTimer = (TimerEvent)GetXSI().EventInfos["sIBL_GUI_XSI_Server_ProcessRequestsTimerEvent"]; if (buttonPressed == "StartServer") { // Start server Info("sIBL_GUI_XSI_Server | Server Started!"); Property prop = (Property)ppgctxt.Source; sIBL_GUI_XSI_Server.Start((String)prop.Parameters["Address"].GetValue2(null), (int)prop.Parameters["Port"].GetValue2(null), (int)prop.Parameters["MaxCnx"].GetValue2(null)); evTimer.Mute = false; } else if (buttonPressed == "StopServer") { Info("sIBL_GUI_XSI_Server | Server Stopped!"); sIBL_GUI_XSI_Server.Stop(); evTimer.Mute = true; } } } } catch (Exception e) { Error(e.ToString()); } return(true); }
/// <summary> /// 移除时间; /// </summary> public void RemoveTimer() { mTimer.IsFinish = true; mTimer.RemoveCallBackFunc(); mTimer = null; }
/// <summary> /// Returns the total number of CPU ticks spent in the specified timer so far. /// </summary> internal static long GetTicks(TimerEvent e) { return(_state.TickTotals == null ? 0 : _state.TickTotals[(int)e]); }
public static void NextFrame(TimerEvent callback) { timers.Add(new TimerInfo { Event = () => { callback(); return(true); } }); }
public TimedEvent(long ticks, TimerEvent evt) { _ticksBegin = ticks; _event = evt; }
public void addEventListener(TimerEvent id, TimerEventHandler handler) { this.handlers[(int)id] = handler; }
public void AddTimer(float d, TimerEvent e) { Timer t = new Timer(d, e); timers.Add(t); }
public void removeEventListener(TimerEvent id) { this.handlers[(int)id] = null; }
/// <summary> /// Creates an active timer with a certain delay. /// Addthis adds this to to the global queue. /// </param> public Timer(int millis, TimerEvent te, bool addthis) : this(te, addthis) { delay = tick = millis / 1000f; Active = true; }
public int Schedule(TimerEvent task, long delay) { return(Schedulemms(task, delay * 1000 * 1000)); }
public TimerHandler(TimerEvent timer) { mTimer = timer; }
/** * Verifies that the {@code timerEvent}'s state is {@code expectedState} and that this is the * first lap for the timer. * * @param timerEvent the {@link TimerEvent} to verify * @param expectedState the expected {@link State} */ private void VerifyStateFirstLap(TimerEvent timerEvent, State expectedState) { Assert.AreEqual(expectedState, timerEvent.GetState()); Assert.IsTrue(timerEvent.GetDuration() > Duration.Zero, timerEvent.GetDuration().ToString()); Assert.AreEqual(timerEvent.GetElapsed(), timerEvent.GetDuration()); }
public Timer(float d, TimerEvent e) { duration = d; onFire = e; }
/** * Verifies that the {@code timerEvent}'s state is {@code expectedState} and that this is not the * first lap for the timer. * * @param timerEvent the {@link TimerEvent} to verify * @param expectedState the expected {@link State} */ private void VerifyStateNotFirstLap(TimerEvent timerEvent, State expectedState) { Assert.AreEqual(expectedState, timerEvent.GetState()); Assert.IsTrue(timerEvent.GetDuration().CompareTo(Duration.Zero) > 0); Assert.IsTrue(timerEvent.GetElapsed().CompareTo(timerEvent.GetDuration()) > 0); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TimerEvent obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
/** * Verifies that the {@code timerEvent}'s description is {@code expectedDescription}. * * @param timerEvent the {@link TimerEvent} to verify * @param expectedDescription the expected description */ private void VerifyDescription(TimerEvent timerEvent, string expectedDescription) { Assert.AreEqual(expectedDescription, timerEvent.GetDescription()); }