Browse Source

get ready for R18

Namdak Tonpa 10 years ago
parent
commit
ac3a91aa13
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/nitro.erl
  2. 1 1
      src/nitro_pickle.erl

+ 1 - 1
src/nitro.erl

@@ -65,7 +65,7 @@ depickle(SerializedData, TTLSeconds) -> ?PICKLER:depickle(SerializedData, TTLSec
 render(X) -> wf_render:render(X).
 wire(Actions) -> action_wire:wire(Actions).
 
-temp_id() -> {_, _, C} = now(), "auto" ++ integer_to_list(C).
+temp_id() -> {_, _, C} = os:timestamp(), "auto" ++ integer_to_list(C).
 
 html_encode(L,Fun) when is_function(Fun) -> Fun(L);
 html_encode(L,EncType) when is_atom(L) -> html_encode(nitro:to_list(L),EncType);

+ 1 - 1
src/nitro_pickle.erl

@@ -1,7 +1,7 @@
 -module(nitro_pickle).
 -compile(export_all).
 
-pickle(Data) -> base64:encode(term_to_binary({Data, now()}, [compressed])).
+pickle(Data) -> base64:encode(term_to_binary({Data, os:timestamp()}, [compressed])).
 depickle(PickledData) ->
     try {Data, _PickleTime} = binary_to_term(base64:decode(wf:to_binary(PickledData))), Data
     catch _:_ -> undefined end.