1249259Sdim//===--- Watchdog.h - Watchdog timer ----------------------------*- C++ -*-===// 2249259Sdim// 3249259Sdim// The LLVM Compiler Infrastructure 4249259Sdim// 5249259Sdim// This file is distributed under the University of Illinois Open Source 6249259Sdim// License. See LICENSE.TXT for details. 7249259Sdim// 8249259Sdim//===----------------------------------------------------------------------===// 9249259Sdim// 10249259Sdim// This file declares the llvm::sys::Watchdog class. 11249259Sdim// 12249259Sdim//===----------------------------------------------------------------------===// 13249259Sdim 14249259Sdim#ifndef LLVM_SUPPORT_WATCHDOG_H 15249259Sdim#define LLVM_SUPPORT_WATCHDOG_H 16249259Sdim 17249259Sdim#include "llvm/Support/Compiler.h" 18249259Sdim 19249259Sdimnamespace llvm { 20249259Sdim namespace sys { 21249259Sdim 22249259Sdim /// This class provides an abstraction for a timeout around an operation 23249259Sdim /// that must complete in a given amount of time. Failure to complete before 24249259Sdim /// the timeout is an unrecoverable situation and no mechanisms to attempt 25249259Sdim /// to handle it are provided. 26249259Sdim class Watchdog { 27249259Sdim public: 28249259Sdim Watchdog(unsigned int seconds); 29249259Sdim ~Watchdog(); 30249259Sdim private: 31249259Sdim // Noncopyable. 32249259Sdim Watchdog(const Watchdog &other) LLVM_DELETED_FUNCTION; 33249259Sdim Watchdog &operator=(const Watchdog &other) LLVM_DELETED_FUNCTION; 34249259Sdim }; 35249259Sdim } 36249259Sdim} 37249259Sdim 38249259Sdim#endif 39