public
Created

Percept example

  • Download Gist
t.erl
Erlang
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
-module(t).
 
-export([start/0, go/0, analyze/0, server/0]).
 
start() ->
percept:profile("test.dat", {t, go, []}, [procs]).
 
go() ->
Led = led:start(1),
Led1 = led:start(1),
Relay = relay:create_ring(10, Led),
Relay1 = relay:create_ring(10, Led1),
relay:start(Relay, 10),
relay:start(Relay1, 10),
timer:sleep(timer:seconds(5)).
 
analyze() ->
percept:analyze("test.dat").
 
server() ->
percept:start_webserver(8989).

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.