Bläddra i källkod

Improve performance

Him188 6 år sedan
förälder
incheckning
fec3702ba9

+ 4 - 0
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/PlatformUtilsAndroid.kt

@@ -94,3 +94,7 @@ actual fun ByteArray.unzip(offset: Int, length: Int): ByteArray {
     }
 }
 
+/**
+ * 时间戳
+ */
+actual val currentTimeMillis: Long get() = System.currentTimeMillis()

+ 5 - 0
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/utils/PlatformUtilsJvm.kt

@@ -74,3 +74,8 @@ actual fun ByteArray.unzip(offset: Int, length: Int): ByteArray {
         return output.toByteArray()
     }
 }
+
+/**
+ * 时间戳
+ */
+actual val currentTimeMillis: Long get() = System.currentTimeMillis()