aboutsummaryrefslogtreecommitdiff
path: root/ports/winnt/include/clockstuff.h
blob: df85699350946fc470e94f4c1908672bd688797e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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