CSharpGL.Time.Update C# (CSharp) Метод

Update() статический приватный Метод

static private Update ( ) : void
Результат void
        internal static void Update()
        {
            DateTime now = DateTime.Now;
            deltaTime = now.Subtract(lastTime);
            lastTime = now;
        }
    }

Usage Example

Пример #1
0
 private void Tick(object sender, System.Timers.ElapsedEventArgs e)
 {
     if (this.maxCycle <= 0 ||// endless
         this.currentCycle < this.maxCycle)   // not reached last cycle yet
     {
         this.currentCycle++;
         Time.Update();
         SceneObject obj = this.rootObject;
         UpdateObject(obj);
     }
     else
     {
         this.Stop();
     }
 }