@Philomath-Qt said in Print current timestamp in Milliseconds since epoch time in QML:
Unfortunately my QML file prints the time two times, because for some reason the signal of the qobject is received twice instead of once. I'm not the first one that has this problem, but to find the root of this problem is rather complecated (origin seems to be multithreading). If you know a easy workaround, so that the the console.log only gets printed every second time, please let me know.
I would rather try to fix the real issue, but if you really want to do that then go ahead..
@Philomath-Qt said in Print current timestamp in Milliseconds since epoch time in QML:
edit: getTime() doesn't work for some reason, i had to use Date.now()
the reason should be printed in the "application output" tab of you editor
this works
var date = new Date()
console.log(date.getTime())