/* sys/clock.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */

#include <sys/emx.h>
#include <os2emx.h>
#include "syscalls.h"

/* This function no longer tries to use QSV_TIME_LOW and QSV_TIME_HIGH
   to increase the time before the return value wraps around.  Now, it
   will wrap around after 49 days. */

long long __clock (void)
{
  ULONG val_ms;
  long long result;

  _sys_get_clock (&val_ms);
  result = (long long)((val_ms - _sys_clock0_ms) / 10);
  return (result);
}
