Browse Source

调整GetSampleTimeFromLastUpdate精度

datasub12_fetal_heart_rate_1
H Vs 1 month ago
parent
commit
c332c80a23
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      HealthMonitor.WebApi/Worker.cs

+ 4
- 4
HealthMonitor.WebApi/Worker.cs View File

@@ -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;




Loading…
Cancel
Save