1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-05 18:30:50 +01: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:
Sergei Trofimov 2017-08-30 14:27:03 +01:00
parent 15333eb09c
commit 2afa8f86a4
2 changed files with 6 additions and 6 deletions

View File

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

View File

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