Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    A deterministic end result when timer is stop

    Mobile and Embedded
    1
    1
    478
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      houmingc last edited by

      i have a LED blinking red and black toggling between the two color.
      When timer stop, the LED appears to be sometimes black, sometimes red.

      I resort to cast the LED red again after timer stop, but the results is still the same.
      I thought this is because time taken to stop the timer is longer compared to the time taken to execute next instruction subsequently, thus a delay is needed

      Now sloution is using qWait and qSleep and if there is other solution.

      QTest::qSleep(100); // no event processing
      QTest::qWait(100); // event processing

      1 Reply Last reply Reply Quote 0
      • First post
        Last post