Luna/apps/app.c

29 lines
533 B
C

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void bye()
{
console_print("byeee!\n");
}
int main()
{
atexit(bye);
char buffer[64];
snprintf(buffer, sizeof(buffer), "Welcome to %s!\n", "Luna");
console_print(buffer);
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
snprintf(buffer, sizeof(buffer), "Realtime clock: %ld s, %ld ns\n", ts.tv_sec, ts.tv_nsec);
console_print(buffer);
for (int i = 0; i < atoi("8"); i++) { console_print("."); }
console_print("\n");
}