package com.github.nullptroma.wallenc.ui.resources

import java.time.Instant
import java.time.ZoneId
import java.time.format.DateTimeFormatter

private val pipelineTimeFormatter: DateTimeFormatter =
    DateTimeFormatter.ofPattern("HH:mm:ss")

fun formatTaskPipelineTime(timestampMs: Long): String =
    Instant.ofEpochMilli(timestampMs)
        .atZone(ZoneId.systemDefault())
        .format(pipelineTimeFormatter)
