Changeset 9662 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers
- Timestamp:
- 06/27/13 15:32:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs
r9646 r9662 84 84 85 85 return from ci in db.FactClientInfos 86 where ci.Time > start && ci.Time < end86 where ci.Time >= start && ci.Time < end 87 87 group ci by ci.Time into timeGroup 88 88 orderby timeGroup.Key … … 90 90 } 91 91 92 private static IEnumerable<IEnumerable<object[]>> CreateSeriesData<T>(IEnumerable<T> data, Func<T, DateTime> timeSelector, params Func<T, object>[] se lectors) {93 return se lectors.Select(selector =>92 private static IEnumerable<IEnumerable<object[]>> CreateSeriesData<T>(IEnumerable<T> data, Func<T, DateTime> timeSelector, params Func<T, object>[] seriesSelectors) { 93 return seriesSelectors.Select(selector => 94 94 data.Select(x => new[] { 95 95 timeSelector(x).ToUniversalTime().ToUnixTimestamp(), … … 101 101 102 102 public static class DateTimeExtensions { 103 public static long ToUnixTimestamp(this DateTime d ) {104 var duration = d - new DateTime(1970, 1, 1, 0, 0, 0);103 public static long ToUnixTimestamp(this DateTime dateTime) { 104 var duration = dateTime - new DateTime(1970, 1, 1, 0, 0, 0); 105 105 106 106 return (long)duration.TotalMilliseconds;
Note: See TracChangeset
for help on using the changeset viewer.