Skip to content
Snippets Groups Projects
Commit 30040e73 authored by Timothe Jost's avatar Timothe Jost
Browse files

better heartbeat message

parent ae973ff3
Branches
No related tags found
No related merge requests found
...@@ -174,16 +174,23 @@ void heartBeatHandler(int signum) ...@@ -174,16 +174,23 @@ void heartBeatHandler(int signum)
} }
// Prints a changing heartbeat message to display that the program is still live if nothing is happening // Prints a changing heartbeat message to display that the program is still live if nothing is happening
static bool alternate = false; static uint8_t dot_count = 0;
if (alternate) switch (dot_count)
{ {
case 0:
printf("\theartbeat \t\t\r");
break;
case 1:
printf("\theartbeat. \t\t\r"); printf("\theartbeat. \t\t\r");
} break;
else case 2:
{ printf("\theartbeat.. \t\t\r");
break;
case 3:
printf("\theartbeat... \t\t\r"); printf("\theartbeat... \t\t\r");
break;
} }
alternate = !alternate; dot_count = (dot_count + 1) % 4;
fflush(stdout); fflush(stdout);
} }
// Create Threads // Create Threads
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment