mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-31 22:11:20 +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:
		| @@ -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'), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user