Ignore:
Timestamp:
Jun 26, 2010, 9:51:11 PM (12 years ago)
Author:
Paul Lelgemann
Message:

o KeySearcher: more precise statistics in the new visualization of distributed search

Location:
trunk/CrypPlugins/KeySearcher/Converter
Files:
1 deleted
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/Converter/TimeSpanToStringConverter.cs

    r1706 r1707  
    55namespace KeySearcherConverter
    66{
    7     public class TimeSpanConverter : IValueConverter
     7    public class TimeSpanToStringConverter : IValueConverter
    88    {
    99        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     
    1919                return "~";
    2020
     21            var seconds = timeSpan.Seconds;
     22            if (seconds == 0 && timeSpan.Milliseconds > 0)
     23                seconds = 1;
     24
    2125            if (timeSpan.Days > 0)
    2226                return string.Format("{0:D2} days, {1:D2}:{2:D2}:{3:D2}", timeSpan.Days, timeSpan.Hours,
    23                                      timeSpan.Minutes, timeSpan.Seconds);
     27                                     timeSpan.Minutes, seconds);
    2428
    25             return string.Format("{0:D2}:{1:D2}:{2:D2}", timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds);
     29            return string.Format("{0:D2}:{1:D2}:{2:D2}", timeSpan.Hours, timeSpan.Minutes, seconds);
    2630        }
    2731
Note: See TracChangeset for help on using the changeset viewer.