Elm Exactly
Results / elm-time /

TimePosixTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Time.posixToMillis` gives back the milliseconds a `Time.Posix` was made from with `Time.millisToPosix`.

Results

elm-0.19.1

passran in 32 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
roundtrip: 1000

elm-0.19.2

passran in 26 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
roundtrip: 1000

elm-0.19.3

passran in 26 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
roundtrip: 1000

lamdera-1.5.0

passran in 33 ms
Output
roundtrip: 1000

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm-time/TimePosixTest] in its title.

Source

The -- CHECK: lines give the expected output.

module TimePosixTest exposing (main)
{-| `Time.posixToMillis` gives back the milliseconds a `Time.Posix` was made from with `Time.millisToPosix`.
-}
-- CHECK: roundtrip: 1000
import Html exposing (text)
import Time
main =
let
posix = Time.millisToPosix 1000
_ = Debug.log "roundtrip" (Time.posixToMillis posix)
in
text "done"