Formerly andreasewering/elm-protoc-utils. Search finds this package by either name.
Conversions between the Protobuf Well-Known Type "Duration" and Milliseconds as a Int to be compatable with Elm's Time.Posix.
Convert a Duration to a number of milliseconds. Note that this only guarantees keeping precision in the millisecond range - micro/nanoseconds can be lost due to floating point arithmetic.
Custom Json Encoder for Duration, which formats a duration as a string. For example, 123 seconds and 450 milliseconds is encoded as "123.45s".
Custom Json Decoder for Duration, which accepts a duration as a string matching the above format (number of seconds with a "s" suffix).
Convert a number of milliseconds to a Duration. Note that this only guarantees keeping precision in the millisecond range - micro/nanoseconds can be lost due to floating point arithmetic.