Closed shamis closed 7 years ago
@shamis @c-bik We should not use os:timestamp anywhere in our code. Where is this used now?
If unique timestamps are not required, os:timestamp are OK for debugging purposes. If imem is a dependency, imem_meta:time() is still preferred to represent time because it then is comparable to other logs of the system.
@stoch imem isn't a dependency of erloci or erlocipool projects. For erlang applications/projects (which do not have imem), we have to rely on erlang native time APIs -- for all timestamp needs debugging or otherwise!
@c-bik Agreed, but we must pick the same time concept everywhere.
This means in our case: adapted system time (default VM start parameters); : timestamp() -> SystemTime = erlang:system_time(1000000), % or less resolution {SystemTime div 1000000, SystemTime rem 1000000}. % or whatever format you need
changed random module to rand and erlang:now() to os:timestamp()