Skip to main content
Glama
TimeUtils.kt554 B
package maestro.cli.util import kotlin.math.roundToLong import kotlin.time.Duration import kotlin.time.Duration.Companion.seconds object TimeUtils { fun durationInSeconds(startTimeInMillis: Long?, endTimeInMillis: Long?): Duration { if (startTimeInMillis == null || endTimeInMillis == null) return Duration.ZERO return ((endTimeInMillis - startTimeInMillis) / 1000f).roundToLong().seconds } fun durationInSeconds(durationInMillis: Long): Duration { return ((durationInMillis) / 1000f).roundToLong().seconds } }

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/mobile-dev-inc/Maestro'

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