[InstCombine] Signed saturation tests. NFC
[llvm-complete.git] / include / llvm / Support / Watchdog.h
blob281595e8f2722524cfa25fc7216eca3f2f36a5fa
1 //===--- Watchdog.h - Watchdog timer ----------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the llvm::sys::Watchdog class.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_SUPPORT_WATCHDOG_H
14 #define LLVM_SUPPORT_WATCHDOG_H
16 #include "llvm/Support/Compiler.h"
18 namespace llvm {
19 namespace sys {
21 /// This class provides an abstraction for a timeout around an operation
22 /// that must complete in a given amount of time. Failure to complete before
23 /// the timeout is an unrecoverable situation and no mechanisms to attempt
24 /// to handle it are provided.
25 class Watchdog {
26 public:
27 Watchdog(unsigned int seconds);
28 ~Watchdog();
29 private:
30 // Noncopyable.
31 Watchdog(const Watchdog &other) = delete;
32 Watchdog &operator=(const Watchdog &other) = delete;
37 #endif