How to compare timestamp in qt?
-
In Qt how to compare the timestamp in a loop if it reach 100ms every second it will break the loop.Anybody tells me how to do that
-
In Qt how to compare the timestamp in a loop if it reach 100ms every second it will break the loop.Anybody tells me how to do that
@Beginner_to_code Please provide more information.
What exactly is timestamp here (what is its data type)?
Please show your current code and explain what happens. -
I need to get system current time and check the time in a loop until it reach 100ms .
if it reach 100ms it will print some debug statement and wait for the next second to reach 100ms.
I am going to log those statements in a file which contains the timestamp like(
15:08:36:100
15:08:37:100
15:08:38:100
15:08:39:100
15:08:40:100
15:08:41:100
15:08:42:100
15:08:43:100
15:08:44:100
15:08:45:100
15:08:46:100
15:08:47:100) -
I need to get system current time and check the time in a loop until it reach 100ms .
if it reach 100ms it will print some debug statement and wait for the next second to reach 100ms.
I am going to log those statements in a file which contains the timestamp like(
15:08:36:100
15:08:37:100
15:08:38:100
15:08:39:100
15:08:40:100
15:08:41:100
15:08:42:100
15:08:43:100
15:08:44:100
15:08:45:100
15:08:46:100
15:08:47:100)@Beginner_to_code don't do it in the loop. Use QTimer with 100ms interval. https://doc.qt.io/qt-5/qtimer.html