]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygwin/hires.h
* environ.cc (environ_init): Avoid a compiler warning.
[newlib-cygwin.git] / winsup / cygwin / hires.h
1 /* hires.h: Definitions for hires clock calculations
2
3 Copyright 2002 Red Hat, Inc.
4
5 This file is part of Cygwin.
6
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
9 details. */
10
11 #ifndef __HIRES_H__
12 #define __HIRES_H__
13
14 #include <mmsystem.h>
15
16 class hires_base
17 {
18 protected:
19 int inited;
20 virtual void prime () {}
21 public:
22 virtual LONGLONG usecs (bool justdelta) {return 0LL;}
23 virtual ~hires_base () {}
24 };
25
26 class hires_us : hires_base
27 {
28 LARGE_INTEGER primed_ft;
29 LARGE_INTEGER primed_pc;
30 double freq;
31 void prime ();
32 public:
33 LONGLONG usecs (bool justdelta);
34 };
35
36 class hires_ms : hires_base
37 {
38 DWORD initime_ms;
39 LARGE_INTEGER initime_us;
40 UINT minperiod;
41 void prime ();
42 public:
43 LONGLONG usecs (bool justdelta);
44 ~hires_ms ();
45 };
46 #endif /*__HIRES_H__*/
This page took 0.036047 seconds and 5 git commands to generate.