Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/liquidsoap
- set("log.stdout", true);
- set("server.telnet", true);
- timeout = ref 180.;
- def timeout.callback() =
- print("callback is called by timeout, ts: " ^ string_of(gettimeofday()));
- !timeout;
- end
- def timeout.change(value) =
- timeout := float_of_string(value);
- "new timeout: " ^ string_of(!timeout);
- end
- add_timeout(fast = false, !timeout, timeout.callback);
- server.register(namespace = "timeout",
- description = "Changes current timeout",
- usage = "change <timeout>", "change", timeout.change);
- security = single("/home/security.mp3");
- output.dummy(security)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement