1 /* 2 * Copyright (c) 2017-2018 Nitrokey UG 3 * 4 * This file is part of Nitrokey App. 5 * 6 * Nitrokey App is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * any later version. 10 * 11 * Nitrokey App is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with Nitrokey App. If not, see <http://www.gnu.org/licenses/>. 18 * 19 * SPDX-License-Identifier: GPL-3.0 20 */ 21 22 #ifndef NITROKEYAPP_OWNSLEEP_H 23 #define NITROKEYAPP_OWNSLEEP_H 24 25 #include <QThread> 26 27 class OwnSleep : public QThread { 28 public: usleep(unsigned long usecs)29 static void usleep(unsigned long usecs) { QThread::usleep(usecs); } msleep(unsigned long msecs)30 static void msleep(unsigned long msecs) { QThread::msleep(msecs); } sleep(unsigned long secs)31 static void sleep(unsigned long secs) { QThread::sleep(secs); } 32 }; 33 34 #endif //NITROKEYAPP_OWNSLEEP_H 35