-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaced erlang:now with erlang:timestamp #87
base: develop
Are you sure you want to change the base?
Conversation
Here is the issue I created about it: #86. |
Hi Thijs, thanks for the contribution! However, we currently need to maintain backwards compatibility with Erlang R16, which does not have the erlang:timestamp function. Once we're at a point where we can drop support for previous Erlang versions, then we may be ready to migrate to erlang:timestamp, but for the time being I think we will unfortunately need to stick with erlang:now. |
I'm also concerned about potential race conditions that might occur, since unlike erlang:now, erlang:timestamp does not guarantee that consecutive calls on the same node return monotonically increasing values. I'm not sure if this would actually be an issue, but I'd need to look over the code some more and experiment.... |
On the other hand, if your issue is just that warnings_as_errors is enabled and you can't get riak_ensemble to compile under R18, I would be happy to consider a pull request that adds the nowarn_deprecated_function compile flag :) |
The recommended approach here is to use |
👎 to the approach that adds the |
So I guess both these occurrences can be replaced by |
@cmeiklejohn Thanks for the info on |
We've put it in a standalone library so we can include it in the Lasp libraries, given you run into problems if you just copy |
Thanks @cmeiklejohn! Sometimes Erlang's flat module namespace can be a real PITA. |
Sorry hit the wrong button 😝 |
This time I used the time_compat library, which also removed the use of |
Similar to basho#87
Bump. I'd also recommend |
Replaced erlang:now with erlang:timestamp as erlang:now is deprecated in Erlang 18.