Exemplo n.º 1
0
        protected virtual void CreateNewSession(DateTime toTime)
        {
            DateTime utcNow = DateTime.UtcNow;

            this.PreviousSessionDuration = toTime - this.StartTime;
            this.PauseDuration           = utcNow - this.PauseTime;
            if (this.PreviousSessionDuration.Milliseconds < 0)
            {
            }
            this.StartTime = utcNow;
            this.PauseTime = this.StartTime;
            this.SessionId++;
            this.FirstStart = false;
            UserPrefs.SetDateTime("AppSession.StartTime", this.StartTime);
            UserPrefs.SetDateTime("AppSession.PauseTime", this.PauseTime);
            UserPrefs.SetInt("AppSession.SessionId", this.SessionId);
            UserPrefs.SaveDelayed();
        }
Exemplo n.º 2
0
 public static void SaveDelayed()
 {
     UserPrefs.SaveDelayed(1.2f);
 }