1192904Sbms//===--- Watchdog.h - Watchdog timer ----------------------------*- C++ -*-===// 2192904Sbms// 3192904Sbms// The LLVM Compiler Infrastructure 4192904Sbms// 5192904Sbms// This file is distributed under the University of Illinois Open Source 6192904Sbms// License. See LICENSE.TXT for details. 7192904Sbms// 8192904Sbms//===----------------------------------------------------------------------===// 9192904Sbms// 10192904Sbms// This file declares the llvm::sys::Watchdog class. 11192904Sbms// 12192904Sbms//===----------------------------------------------------------------------===// 13192904Sbms 14192904Sbms#ifndef LLVM_SUPPORT_WATCHDOG_H 15192904Sbms#define LLVM_SUPPORT_WATCHDOG_H 16192904Sbms 17192904Sbms#include "llvm/Support/Compiler.h" 18192904Sbms 19192904Sbmsnamespace llvm { 20192904Sbms namespace sys { 21192904Sbms 22192904Sbms /// This class provides an abstraction for a timeout around an operation 23192904Sbms /// that must complete in a given amount of time. Failure to complete before 24192904Sbms /// the timeout is an unrecoverable situation and no mechanisms to attempt 25192904Sbms /// to handle it are provided. 26192904Sbms class Watchdog { 27192904Sbms public: 28192904Sbms Watchdog(unsigned int seconds); 29192904Sbms ~Watchdog(); 30249252Sae private: 31192904Sbms // Noncopyable. 32192904Sbms Watchdog(const Watchdog &other) LLVM_DELETED_FUNCTION; 33192904Sbms Watchdog &operator=(const Watchdog &other) LLVM_DELETED_FUNCTION; 34192904Sbms }; 35192904Sbms } 36192904Sbms} 37192904Sbms 38192904Sbms#endif 39192904Sbms