-#if HAVE_GETTIMEOFDAY
- int secs, msecs;
- struct timeval current;
-
- gettimeofday(¤t, 0);
- secs = (int) (current.tv_sec - previous.tv_sec);
- msecs = (int) ((current.tv_usec - previous.tv_usec) / 1000);
- if (msecs < 0) {
- msecs += 1000;
- --secs;
- }
- if (msecs >= 1000) {
- secs += msecs / 1000;
- msecs %= 1000;
- }
- printw("%6d.%03d ", secs, msecs);
+ TimeType current;
+
+ GetClockTime(¤t);
+ printw("%6.03f ", ElapsedSeconds(&previous, ¤t));