Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. Qt Contribution
  4. Running the thread for every 60 seconds
QtWS25 Last Chance

Running the thread for every 60 seconds

Scheduled Pinned Locked Moved Qt Contribution
2 Posts 2 Posters 2.3k Views
  • 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.
  • J Offline
    J Offline
    janaki
    wrote on last edited by
    #1

    i have a thread class which should send one message for every 60 seconds

    i have started that thread in my main class constructor

    my thread class is having a function message() which is called in the virtual void run()
    in order to send the message for every 60 seconds i have used usleep(mseconds)
    but am getting the message for only once when my application is starting for the first time

    may i know the solution for sending that message for every 60 seconds

    thank u

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Use a timer instead. A thread is not a timer.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved