Units

object Units

Types

Memory
Link copied to clipboard
annotation class Memory
Time
Link copied to clipboard
annotation class Time

Functions

formatDate
Link copied to clipboard
fun formatDate(millis: Long, format: String? = "yyyy-MM-dd"): String
格式化毫秒
fun formatDate(millis: String?, format: String? = "yyyy-MM-dd"): String
格式化毫秒
toKM
Link copied to clipboard
fun toKM(distance: Float): String
距离单位超过千米自动换算km

Properties

BYTE
Link copied to clipboard
const val BYTE: Int = 1
DAY
Link copied to clipboard
const val DAY: Int = 86400000
GB
Link copied to clipboard
const val GB: Int = 1073741824
HOUR
Link copied to clipboard
const val HOUR: Int = 3600000
KB
Link copied to clipboard
const val KB: Int = 1024
MB
Link copied to clipboard
const val MB: Int = 1048576
MIN
Link copied to clipboard
const val MIN: Int = 60000
MSEC
Link copied to clipboard
const val MSEC: Int = 1
SEC
Link copied to clipboard
const val SEC: Int = 1000