Running the thread for every 60 seconds
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
Use a timer instead. A thread is not a timer.