diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-02-19 23:17:53 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-02-19 23:17:53 +0000 |
commit | 33f058f0e67357543c0b1619f4f45779d054a6bf (patch) | |
tree | eebb2cf2edeeb1ed314967c923021804c7f4d3b0 /alarm.c | |
parent | 61f929e6b38829afcdc8577be74594ca73a91bde (diff) | |
download | verteco-33f058f0e67357543c0b1619f4f45779d054a6bf.tar.gz |
Remove debug/testing files.
Diffstat (limited to '')
-rw-r--r-- | alarm.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/alarm.c b/alarm.c deleted file mode 100644 index a0bfa35..0000000 --- a/alarm.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <signal.h> -#include <stdio.h> -#include <sys/select.h> -#include <unistd.h> -#include <time.h> - -volatile unsigned int variable = 0; -volatile unsigned int print_variable = 0; - -void alarm_handler(int signum) -{ - alarm(60); -} - -int main() -{ - signal(SIGALRM, alarm_handler); - alarm(1); - - for (;;) - { - select(0, NULL, NULL, NULL, NULL); - time_t t = time(NULL); - struct tm tm = *localtime(&t); - printf("%d-%d-%d %d:%d:%d\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); - - } -} - |