Skip to main content
Glama
sleep.ts458 B
/** * Service class that handles sleep functionality */ export class SleepService { /** * Wait for the specified duration * @param ms Duration to wait in milliseconds * @returns Promise that resolves after the duration */ async sleep(ms: number): Promise<void> { if (isNaN(ms) || ms < 0) { throw new Error("milliseconds must be a non-negative number"); } return new Promise(resolve => setTimeout(resolve, ms)); } }

Implementation Reference

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Garoth/sleep-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server