Which unit has the difference of two Date.now() calls? #1675
Replies: 3 comments
-
Posted at 2023-06-26 by @fanoush
why milli-milli=micro?
Still it can be milli but with fraction BTW there is also EDIT: what is a bit strange is that in Bangle 2 emulator |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-06-26 by @gfwilliams
Yes... If I recall the JS spec says that On the emulator |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-06-26 by @MaBecker Ok, so it's 0.885 ms - Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-06-26 by @MaBecker
If you like to check the runtime of you code you can use something like this:
Are this 0.885 mili seconds or 0.885 micro second
Reference say:
Get the number of milliseconds elapsed since 1970 (or on embedded platforms, since startu)
So the difference should be micro seconds. Not shure because a output of Date.now() looks like this
41866529.26635742187
.Beta Was this translation helpful? Give feedback.
All reactions