basho / erlang_js

A linked-in driver for Erlang to Mozilla's Spidermonkey Javascript runtime.
Apache License 2.0
238 stars 88 forks source link

Update timestamp usage #60

Closed mmmries closed 8 years ago

mmmries commented 8 years ago

I was testing out a few things with this library and noticed that it was failing to compile under Erlang/OTP 18+ because of the usage of erlang:now(). Not sure if this is the right move for the overall project, but if other people want to build this on more recent versions of erlang they might want to make a similar patch.

The deprecation information is documented in the erts docs for why they deprecated this.

whitfin commented 8 years ago

FWIW #58 covers this in a slightly more elegant way

mmmries commented 8 years ago

@zackehh thanks for the reference. I hadn't thought of timer:tc, but obviously that is a more backwards-compatible way to handle this issue since it has been supported for many versions now.

I was also unaware of the erts_exit issue. Thanks for pointing out your PR.