schedule

fun schedule(time: String, c: CommandBuilder.() -> Unit): Func(source)

Schedules commands to be run at a specific time

Creates a function and returns a schedule command to run it at a specific time

Example:

ns.schedule(ticks(10)) {
cmd("say Hello World!")
cmd("say Hi!")
}

See also


fun schedule(time: String, f: Func): Func(source)

Schedules a function to be run at a specific time

Example:

val myFunc = ns.function("my_func") { /*...*/}
ns.schedule(secs(10), myFunc)

See also