Compare commits

..

No commits in common. "2a2270835033358f8146e316ae710cdc10c6d898" and "62deeebe63fc92254e3670715540e21d0c14f404" have entirely different histories.

2 changed files with 2 additions and 33 deletions

View File

@ -1,3 +1,3 @@
* the-worlds-least-useful-clock
# the-worlds-least-useful-clock
An example application for use in demonstrating Docker images and the Openshift Image Registry

View File

@ -1,31 +0,0 @@
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
int main (int argc, char ** argv)
{
time_t timestamp;
struct tm * timeinfo;
srand(time(NULL));
while (true)
{
time(&timestamp);
timeinfo = localtime(&timestamp);
if ((rand() % 10) == 0)
{
printf("The time is now for coffee. Coffee time it is.\n");
}
else
{
printf("The time is now: %s", asctime(timeinfo));
}
fflush(stdout);
sleep(rand() % 12);
}
return 0;
}