docs: add comments, move sleep() arg to #define
This commit is contained in:
parent
bab5b2550f
commit
ab10a8d036
1 changed files with 6 additions and 1 deletions
7
main.c
7
main.c
|
@ -1,8 +1,13 @@
|
||||||
|
#define SLEEP_SECONDS 20
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
while (1) {
|
while (1) {
|
||||||
sleep(20);
|
sleep(SLEEP_SECONDS);
|
||||||
|
// fd 1 = stdout fd number
|
||||||
|
// "*" = symbol to print
|
||||||
|
// 1 = size of a string to print
|
||||||
write(1, "*", 1);
|
write(1, "*", 1);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue