mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-12 07:58:07 +00:00
Instruments: Add millisecond MeasurementType and conversion
Allows for reporting times in milliseconds as used with the acmecape instrument.
This commit is contained in:
parent
2de2b36387
commit
9b465c2766
@ -76,11 +76,19 @@ _measurement_types = [
|
|||||||
MeasurementType('time', 'seconds',
|
MeasurementType('time', 'seconds',
|
||||||
conversions={
|
conversions={
|
||||||
'time_us': lambda x: x * 1000000,
|
'time_us': lambda x: x * 1000000,
|
||||||
|
'time_ms': lambda x: x * 1000,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
MeasurementType('time_us', 'microseconds',
|
MeasurementType('time_us', 'microseconds',
|
||||||
conversions={
|
conversions={
|
||||||
'time': lambda x: x / 1000000,
|
'time': lambda x: x / 1000000,
|
||||||
|
'time_ms': lambda x: x / 1000,
|
||||||
|
}
|
||||||
|
),
|
||||||
|
MeasurementType('time_ms', 'milliseconds',
|
||||||
|
conversions={
|
||||||
|
'time': lambda x: x / 1000,
|
||||||
|
'time_us': lambda x: x * 1000,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
MeasurementType('temperature', 'degrees'),
|
MeasurementType('temperature', 'degrees'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user