SOFA API  99934cbc
Open source framework for multi-physics simuation
sofa::helper::system::thread::TimeoutWatchdog Class Reference

#include <TimeoutWatchdog.h>

Detailed Description

Instances of this class prevents the current program from running longer than a specified duration.

Public Member Functions

 TimeoutWatchdog ()
 Default constructor. More...
 
 ~TimeoutWatchdog ()
 Destructor: interrupts the watchdog and cleans-up. More...
 
void start (unsigned timeout_sec)
 Starts a thread that will terminate the program after the specified duration elapses. More...
 

Constructor details

sofa::helper::system::thread::TimeoutWatchdog::TimeoutWatchdog ( )

Default constructor.

sofa::helper::system::thread::TimeoutWatchdog::~TimeoutWatchdog ( )

Destructor: interrupts the watchdog and cleans-up.

Function details

void sofa::helper::system::thread::TimeoutWatchdog::start ( unsigned  timeout_sec)

Starts a thread that will terminate the program after the specified duration elapses.