--- //depot/vendor/freebsd/src/sys/kern/kern_time.c 2005/10/23 23:00:53 +++ //depot/user/rwatson/clock/src/sys/kern/kern_time.c 2005/10/28 17:42:44 @@ -225,6 +225,14 @@ case CLOCK_MONOTONIC: nanouptime(ats); break; + case CLOCK_SECOND: + getnanotime(ats); + ats->tv_nsec = 0; + break; + case CLOCK_POOR: + getnanotime(ats); + ats->tv_nsec = 0; + break; default: return (EINVAL); } @@ -306,6 +314,7 @@ switch (clock_id) { case CLOCK_REALTIME: case CLOCK_MONOTONIC: + case CLOCK_POOR: /* * Round up the result of the division cheaply by adding 1. * Rounding up is especially important if rounding down @@ -318,6 +327,10 @@ /* Accurately round up here because we can do so cheaply. */ ts->tv_nsec = (1000000000 + hz - 1) / hz; break; + case CLOCK_SECOND: + ts->tv_sec = 1; + ts->tv_nsec = 0; + break; default: return (EINVAL); } --- //depot/vendor/freebsd/src/sys/sys/time.h 2005/04/02 12:35:19 +++ //depot/user/rwatson/clock/src/sys/sys/time.h 2005/10/28 17:42:44 @@ -238,6 +238,8 @@ #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 #define CLOCK_MONOTONIC 4 +#define CLOCK_SECOND 5 +#define CLOCK_POOR 6 #endif #ifndef TIMER_ABSTIME