1234567891011121314151617181920 |
- use std
- use "dispatch"
- const sleeputil = {params
- var sn
- std.put("sleep called\n")
- std.put("s.\n")
- sn=params[0]
- match std.intparse(sn)
- | `std.Some n: std.usleep(n*std.Msec)
- | `std.None: std.put("{}\n","wrong value")
- ;;
- std.put("f.\n")
- }
- const __init__ = {
- dispatch.register("sleep",sleeputil)
- }
|