core.sleep
0.000001

Sleeps for a period of time.

Arguments
sleeprequired
The number of seconds to sleep.
Return Value
true
something went wrong :(
Sleeping for a few seconds
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.core.sleep.call(
  seconds: 3
)

# 3 seconds later...
client.core.sleep.call(
  null, seconds: 3
);

// 3 seconds later...
curl "https://proc.run/core/sleep?seconds=3" --silent --request POST \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain"
 

true


Stuck? Want to chat about an idea? Join the community on Discord.