How do I calculate server uptime in Ktor. In nodejs, there is process.uptime() which returns server uptime. I don't see an equivalent method in Ktor. Any suggestions ?
CodePudding user response:
Import:
import kotlin.time.toDuration
import kotlin.time.DurationUnit
import java.lang.management.ManagementFactory