LLVM API Documentation

Watchdog.h
Go to the documentation of this file.
00001 //===--- Watchdog.h - Watchdog timer ----------------------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 //  This file declares the llvm::sys::Watchdog class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_SUPPORT_WATCHDOG_H
00015 #define LLVM_SUPPORT_WATCHDOG_H
00016 
00017 #include "llvm/Support/Compiler.h"
00018 
00019 namespace llvm {
00020   namespace sys {
00021 
00022     /// This class provides an abstraction for a timeout around an operation
00023     /// that must complete in a given amount of time. Failure to complete before
00024     /// the timeout is an unrecoverable situation and no mechanisms to attempt
00025     /// to handle it are provided.
00026     class Watchdog {
00027     public:
00028       Watchdog(unsigned int seconds);
00029       ~Watchdog();
00030     private:
00031       // Noncopyable.
00032       Watchdog(const Watchdog &other) LLVM_DELETED_FUNCTION;
00033       Watchdog &operator=(const Watchdog &other) LLVM_DELETED_FUNCTION;
00034     };
00035   }
00036 }
00037 
00038 #endif