-/* $Id: tclock.c,v 1.47 2022/12/10 23:23:27 tom Exp $ */
+/* $Id: tclock.c,v 1.48 2023/02/25 16:42:22 tom Exp $ */
#define NEED_TIME_H
#include <test.priv.h>
int
main(int argc, char *argv[])
{
+ static TimeType initial;
+
int i, cx, cy;
double cr, mradius, hradius, mangle, hangle;
double sangle, sradius, hours;
char szChar[20];
char *text;
short my_bg = COLOR_BLACK;
-#if HAVE_GETTIMEOFDAY
- struct timeval current;
-#endif
- double fraction = 0.0;
+ TimeType current;
#if HAVE_USE_DEFAULT_COLORS
bool d_option = FALSE;
#endif
hdx = A2X(hangle, hradius);
hdy = A2Y(hangle, hradius);
-#if HAVE_GETTIMEOFDAY
- gettimeofday(¤t, 0);
- fraction = ((double) current.tv_usec / 1.0e6);
-#endif
- sangle = ((t->tm_sec + fraction) * (2.0 * PI) / 60.0);
+ GetClockTime(¤t);
+
+ sangle = (ElapsedSeconds(&initial, ¤t) * (2.0 * PI) / 60.0);
sdx = A2X(sangle, sradius);
sdy = A2Y(sangle, sradius);