Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/05/13 23:20:28 (12 years ago)
Author:
abeham
Message:

#1590: changed date difference calculation to use UTC dates to avoid wrong time spans around daylight savings changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DebugEngine/3.3/DebugEngine.cs

    r7259 r9343  
    155155      cancellationTokenSource = new CancellationTokenSource();
    156156      stopPending = false;
    157       lastUpdateTime = DateTime.Now;
     157      lastUpdateTime = DateTime.UtcNow;
    158158      timer.Start();
    159159      try {
     
    166166      }
    167167      timer.Stop();
    168       ExecutionTime += DateTime.Now - lastUpdateTime;
     168      ExecutionTime += DateTime.UtcNow - lastUpdateTime;
    169169      cancellationTokenSource.Dispose();
    170170      cancellationTokenSource = null;
     
    242242
    243243      OnStarted();
    244       lastUpdateTime = DateTime.Now;
     244      lastUpdateTime = DateTime.UtcNow;
    245245      timer.Start();
    246246      try {
     
    253253      finally {
    254254        timer.Stop();
    255         ExecutionTime += DateTime.Now - lastUpdateTime;
     255        ExecutionTime += DateTime.UtcNow - lastUpdateTime;
    256256
    257257        if (IsAtBreakpoint)
     
    263263      System.Timers.Timer timer = (System.Timers.Timer)sender;
    264264      timer.Enabled = false;
    265       DateTime now = DateTime.Now;
     265      DateTime now = DateTime.UtcNow;
    266266      ExecutionTime += now - lastUpdateTime;
    267267      lastUpdateTime = now;
Note: See TracChangeset for help on using the changeset viewer.