to_ms function
Requirements.Units.Conversions.to_ms
ยท source
Convert from second to millisecond
Extends Modelica.Units.Icons.Conversion
Convert from second to millisecond: ms := s*1000. The input s is the value in second (type Modelica.Units.SI.Time), the output ms the value in millisecond (type NonSI.Time_ms). The inverse is from_ms.
The conversion is a multiplication by a constant factor, without offset, so it converts differences and rates alike; it is exact up to floating-point rounding and has no limits on the input. The function is inlined. A check model uses it to give a variable of the model in the unit in which the requirement states it; see Conversions. Examples.Elementary.Units.Conversions asserts it through the round trip to_ms(from_ms(7)).
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Inputs
| Name | Type | Description |
|---|---|---|
s input | SI.Time | Value in second |
Outputs
| Name | Type | Description |
|---|---|---|
ms output | NonSI.Time_ms | Value in millisecond |