Sleep command in C++
#include <iostream>
#include <unistd.h>
int main() {
int sec(5);
std::cout << "Wait " << sec << " sec." << std::endl;
sleep(sec);
std::cout << "Done." << std::endl;
return 0;
}
This is my tips for using and setting up Computer, mainly Linux. (English | Magyar | 日本語)
#include <iostream>
#include <unistd.h>
int main() {
int sec(5);
std::cout << "Wait " << sec << " sec." << std::endl;
sleep(sec);
std::cout << "Done." << std::endl;
return 0;
}
This program gets keyboard configuration as setxkb -query
. If you want to know how to get keyboard model or layout by C++ program, this program is helpful for you.
If you want to know the further details, you should get the source of setxkbmap.c
.