Permalink
Browse files

Moved ticker function to separate module to ease purging of module

`yaws'.


git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@456 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent 7ad4846 commit f08b88519493c4581c80cb61f09ac6c5a94d1eba @carsten3347 carsten3347 committed Jul 16, 2003
Showing with 21 additions and 9 deletions.
  1. +1 −9 src/yaws.erl
  2. +20 −0 src/yaws_ticker.erl
View
@@ -478,16 +478,8 @@ ticker(Time, Msg) ->
spawn_link(yaws, ticker, [Time, S, Msg]).
ticker(Time, To, Msg) ->
process_flag(trap_exit, true),
- ticker2(Time, To, Msg).
+ yaws_ticker:ticker(Time, To, Msg).
-ticker2(Time, To, Msg) ->
- receive
- {'EXIT', _} ->
- exit(normal)
- after Time ->
- To ! Msg
- end,
- ticker2(Time, To, Msg).
fmt_ip({A,B,C,D}) ->
[integer_to_list(A), $.,
View
@@ -0,0 +1,20 @@
+-module(yaws_ticker).
+-author('klacke@bluetail.com').
+
+-include_lib("yaws/include/yaws.hrl").
+-include_lib("yaws/include/yaws_api.hrl").
+-include("yaws_debug.hrl").
+
+-export([ticker/3]).
+
+%% Moved here from module yaws to ease purging of yaws.
+%% cschultz
+
+ticker(Time, To, Msg) ->
+ receive
+ {'EXIT', _} ->
+ exit(normal)
+ after Time ->
+ To ! Msg
+ end,
+ ?MODULE:ticker(Time, To, Msg).

0 comments on commit f08b885

Please sign in to comment.