apps: hello: simplify hello world example
'hello world' is an example for showing minimum binary footprint. As
sleep() goes with signaling and scheduling functions which are a little
bit heavy, using it in this example increases the footprint and is
inappropriate.
#include <tinyara/config.h>
#include <stdio.h>
-#include <unistd.h>
/****************************************************************************
* hello_main
****************************************************************************/
-#define PRINT_INTERVAL_SECS 20
-
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char *argv[])
#else
int hello_main(int argc, char *argv[])
#endif
{
- int i;
-
- printf("This Hello World msg will be printed third every 20 seconds\n");
- for (i = 0; i < 3; i++) {
printf("Hello, World!!\n");
- sleep(PRINT_INTERVAL_SECS);
- }
-
return 0;
}
