TimePosixTest
`Time.posixToMillis` gives back the milliseconds a `Time.Posix` was made from with `Time.millisToPosix`.
Results
elm-0.19.1
passran in 32 msOutput
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 msOutput
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 msOutput
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 msOutput
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"