Add a clock to the VGA warning
mostly so it doesn't immediately quit, but also so it's not eating CPU cycles while being useless
This commit is contained in:
parent
a024385a3c
commit
1e2ed1e89a
@ -1,4 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#define TERM_WIDTH 80
|
||||
#define TERM_HEIGHT 25
|
||||
@ -30,5 +33,15 @@ int main(int argc, char * argv[]) {
|
||||
print_message(0, "The VGA Terminal is currently deprecated.");
|
||||
print_message(1, "A new VGA terminal will be built in a future update.");
|
||||
|
||||
return 0;
|
||||
struct timeval now;
|
||||
struct tm * timeinfo;
|
||||
char buffer[80];
|
||||
|
||||
while (1) {
|
||||
gettimeofday(&now, NULL);
|
||||
timeinfo = localtime((time_t *)&now.tv_sec);
|
||||
strftime(buffer, 80, "%H:%M:%S", timeinfo);
|
||||
print_message(4, buffer);
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user