more specifically, is there a way to get the curre...
# multiplatform
m
more specifically, is there a way to get the current system time, such as in
System.getCurrentTimeMillis()
?
c
Not yet. The only workaround for now is to use ktor's
GMTDate
kotlinx time is planned but not even started
m
makes sense, thanks 👍
t
s
or you could use expect/actual because java and kotlin/native both have this method (I don't know if js has this method bc I don't use it)
a
Yea I'd go with the
expect
solution
e
m
thanks, that's very helpful
c
Well, it depends on what do you need but writing correct posix implementation is not that easy as write a single line of code
m
d
Look in kotlin.system package, a multiplatform function like
System.currentTimeMillis()
exists for a start.