(why are there several copies of this code in the tree?)
#include <string.h>
#include <unistd.h>
-#include <mini-os/time.h>
-
#define MAXCONN 64
struct conn {
printf("WOPR reporting for duty on port 4096\n");
- zombietime = NOW();
+ zombietime = time(NULL);
for (;;) {
- if (NOW() - zombietime >= SECONDS(1)) {
+ if (time(NULL) - zombietime >= 1) {
processzombies();
- zombietime = NOW();
+ zombietime = time(NULL);
}
rv = poll(pfds, maxfd, 1000);
if (rv == 0) {
- printf("still waiting ... %"PRId64"\n", NOW());
+ printf("still waiting ... %"PRId64"\n", time(NULL));
continue;
}