package xn.hxp.utils

import android.annotation.SuppressLint
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter

//时间工具类
object TimesUils {

    @SuppressLint("NewApi")
    fun getCurrentDateTime(): String {
        val currentDateTime = LocalDateTime.now()
//        val formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS")
        val formatter = DateTimeFormatter.ofPattern("HHmmssSSS")
        return currentDateTime.format(formatter)
    }

    //秒转毫秒
    fun secondsToMillisecondst(seconds: Int): Long {
        return seconds * 1000L
    }
}