void updLogic_TickEvent(object sender, Updater.DeltaEventArgs e) { TimeSpan deltaTimer = new TimeSpan(DateTime.Now.Ticks - lastTimerTick); lastTimerTick = DateTime.Now.Ticks; this.Invoke((MethodInvoker)(() => { this.OnTick(deltaTimer.TotalSeconds); })); }
void updDraw_TickEvent(object sender, Updater.DeltaEventArgs e) { TimeSpan deltaDraw = new TimeSpan(DateTime.Now.Ticks - lastDrawTick); lastDrawTick = DateTime.Now.Ticks; this.Invoke((MethodInvoker)(() => { this.OnDraw(deltaDraw.TotalSeconds); })); }