Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Engine/PluginsEnumerations.cpp @ 5326:fbe857e942cd
store metrics as integers instead of floats to avoid precision loss in increments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 25 Jun 2023 18:28:49 +0200 |
parents | 0ea402b4d901 |
children | dd9795dc380d |
comparison
equal
deleted
inserted
replaced
5325:9c00e832985f | 5326:fbe857e942cd |
---|---|
576 | 576 |
577 default: | 577 default: |
578 throw OrthancException(ErrorCode_ParameterOutOfRange); | 578 throw OrthancException(ErrorCode_ParameterOutOfRange); |
579 } | 579 } |
580 } | 580 } |
581 | |
582 | |
583 MetricsType Convert(OrthancPluginMetricsType type) | |
584 { | |
585 switch (type) | |
586 { | |
587 case OrthancPluginMetricsType_Default: | |
588 return MetricsType_Default; | |
589 | |
590 case OrthancPluginMetricsType_Timer: | |
591 return MetricsType_MaxOver10Seconds; | |
592 | |
593 default: | |
594 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
595 } | |
596 } | |
581 } | 597 } |
582 } | 598 } |