Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

  1. //===--- Watchdog.h - Watchdog timer ----------------------------*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file declares the llvm::sys::Watchdog class.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_SUPPORT_WATCHDOG_H
  14. #define LLVM_SUPPORT_WATCHDOG_H
  15. #include "llvm/Support/Compiler.h"
  16. namespace llvm {
  17. namespace sys {
  18. /// This class provides an abstraction for a timeout around an operation
  19. /// that must complete in a given amount of time. Failure to complete before
  20. /// the timeout is an unrecoverable situation and no mechanisms to attempt
  21. /// to handle it are provided.
  22. class Watchdog {
  23. public:
  24. Watchdog(unsigned int seconds);
  25. ~Watchdog();
  26. private:
  27. // Noncopyable.
  28. Watchdog(const Watchdog &other) LLVM_DELETED_FUNCTION;
  29. Watchdog &operator=(const Watchdog &other) LLVM_DELETED_FUNCTION;
  30. };
  31. }
  32. }
  33. #endif