1/* clock.c - Replacement for WindowsCE
2   Copyright (C) 2010 Free Software Foundation, Inc.
3
4   This file is free software; as a special exception the author gives
5   unlimited permission to copy and/or distribute it, with or without
6   modifications, as long as this notice is preserved.
7
8   This file is distributed in the hope that it will be useful, but
9   WITHOUT ANY WARRANTY, to the extent permitted by law; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  */
12
13#if HAVE_CONFIG_H
14#include <config.h>
15#endif
16
17#ifdef HAVE_W32CE_SYSTEM
18#include <windows.h>
19#include <time.h>
20#include <assert.h>
21
22clock_t
23_gcry_clock (void)
24{
25  assert (CLOCKS_PER_SEC == 1000);
26#warning Replace by a correct implementaion.
27  /* It seems that GetProcessTimes is available in the kernel but
28     without a declaration.  If that fails we would need to walk over
29     all threads and tally up the GetThreadTimes.  */
30
31  return GetTickCount ();
32}
33
34#else
35# error No replacement function for clock known
36#endif
37