|
@@ -2611,10 +2611,10 @@ namespace HealthMonitor.WebApi |
|
|
private DateTime GetSampleTimeFromLastUpdate(DateTime lastUpdate,int interval) |
|
|
private DateTime GetSampleTimeFromLastUpdate(DateTime lastUpdate,int interval) |
|
|
{ |
|
|
{ |
|
|
DateTime nowInterval = lastUpdate; |
|
|
DateTime nowInterval = lastUpdate; |
|
|
if (nowInterval.Second > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
nowInterval = nowInterval.AddMinutes(1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//if (nowInterval.Second > 0) |
|
|
|
|
|
//{ |
|
|
|
|
|
// nowInterval = nowInterval.AddMinutes(1); |
|
|
|
|
|
//} |
|
|
// 计算last_update到上一间隔的分钟数 |
|
|
// 计算last_update到上一间隔的分钟数 |
|
|
int minutesToSubtract = nowInterval.Minute % interval; |
|
|
int minutesToSubtract = nowInterval.Minute % interval; |
|
|
|
|
|
|
|
|