mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
insturment: add catergory for time + doc fix
- Add a category name for time MeasurmentType's, as there are now multiple. - Fix the names of time_ms and time_us in the documentation.
This commit is contained in:
parent
15333eb09c
commit
2afa8f86a4
@ -75,19 +75,19 @@ class MeasurementType(object):
|
||||
# Standard measures
|
||||
_measurement_types = [
|
||||
MeasurementType('unknown', None),
|
||||
MeasurementType('time', 'seconds',
|
||||
MeasurementType('time', 'seconds', 'time',
|
||||
conversions={
|
||||
'time_us': lambda x: x * 1000000,
|
||||
'time_ms': lambda x: x * 1000,
|
||||
}
|
||||
),
|
||||
MeasurementType('time_us', 'microseconds',
|
||||
MeasurementType('time_us', 'microseconds', 'time',
|
||||
conversions={
|
||||
'time': lambda x: x / 1000000,
|
||||
'time_ms': lambda x: x / 1000,
|
||||
}
|
||||
),
|
||||
MeasurementType('time_ms', 'milliseconds',
|
||||
MeasurementType('time_ms', 'milliseconds', 'time',
|
||||
conversions={
|
||||
'time': lambda x: x / 1000,
|
||||
'time_us': lambda x: x * 1000,
|
||||
|
@ -229,11 +229,11 @@ defined measurement types are
|
||||
+-------------+-------------+---------------+
|
||||
| name | units | category |
|
||||
+=============+=============+===============+
|
||||
| time | seconds | |
|
||||
| time | seconds | time |
|
||||
+-------------+-------------+---------------+
|
||||
| time | microseconds| |
|
||||
| time_us | microseconds| time |
|
||||
+-------------+-------------+---------------+
|
||||
| time | milliseconds| |
|
||||
| time_ms | milliseconds| time |
|
||||
+-------------+-------------+---------------+
|
||||
| temperature | degrees | |
|
||||
+-------------+-------------+---------------+
|
||||
|
Loading…
x
Reference in New Issue
Block a user