This language bar is your friend. Select your favorite languages!

Idiom #185 Execute function in 30 seconds

Schedule the execution of f(42) in 30 seconds.

let id = window.setTimeout(f, 30000, 42);
import  "time"
timer := time.AfterFunc(
	func() {
import  "time"
go func() {
	time.Sleep(3 * time.Second)

Do you know the best way to do this in your language ?
New implementation...

Idiom created by

Related idioms