aboutsummaryrefslogtreecommitdiff
path: root/ports/winnt/include/clockstuff.h
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2015-02-05 20:53:33 +0000
committerCy Schubert <cy@FreeBSD.org>2015-02-05 20:53:33 +0000
commitf7cba3a80d9ebefc57776fffd17a4ae68f72e494 (patch)
treedc1c5074828f0c5fafe2fb8f5599339dfdc5bc97 /ports/winnt/include/clockstuff.h
parent44a728f815af203cd7a91db83b06325818433463 (diff)
downloadsrc-vendor/ntp/4.2.8p1.tar.gz
src-vendor/ntp/4.2.8p1.zip
Vendor import ntp-4.2.8p1.vendor/ntp/4.2.8p1
Approved by: roberto
Diffstat (limited to 'ports/winnt/include/clockstuff.h')
-rw-r--r--ports/winnt/include/clockstuff.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/ports/winnt/include/clockstuff.h b/ports/winnt/include/clockstuff.h
new file mode 100644
index 000000000000..df8569935094
--- /dev/null
+++ b/ports/winnt/include/clockstuff.h
@@ -0,0 +1,44 @@
+#ifndef _CLOCKSTUFF_H
+#define _CLOCKSTUFF_H
+
+#include <time.h>
+#include <sys\timeb.h>
+
+#include "ntp_fp.h"
+#include "ntp_syslog.h"
+
+
+void init_winnt_time(void);
+void reset_winnt_time(void);
+void lock_thread_to_processor(HANDLE);
+
+/* 100ns intervals between 1/1/1601 and 1/1/1970 as reported by
+ * SystemTimeToFileTime()
+ */
+
+#define FILETIME_1970 0x019db1ded53e8000
+#define HECTONANOSECONDS 10000000
+
+/*
+ * Multimedia Timer
+ */
+
+void set_mm_timer(int);
+
+enum {
+ MM_TIMER_LORES,
+ MM_TIMER_HIRES
+};
+
+/*
+ * get_sys_time_as_filetime is a function pointer to
+ * either GetSystemTimeAsFileTime provided by Windows
+ * or ntpd's interpolating replacement.
+ */
+typedef void (WINAPI *PGSTAFT)(LPFILETIME pftResult);
+extern PGSTAFT get_sys_time_as_filetime;
+extern PGSTAFT pGetSystemTimePreciseAsFileTime;
+
+void lock_thread_to_processor(HANDLE);
+
+#endif