Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-07 07:44:33 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-07 07:44:33 +0400
commit9d0efbb3aeef0490d227c9b98bd478ac1964d16d (patch)
tree005964002ffa58bbddce64254ce2b60cfc9e0d59 /winsup/cygwin/hires.h
parentb841df7954ad31383688775114132af73b7693d4 (diff)
* autoload.cc (timeGetDevCaps): Define new autoload function.
(timeGetTime): Ditto. (timeBeginPeriod): Ditto. (timeEndPeriod): Ditto. * hires.h (hires_base): New class. Renamed from hires. (hires_us): New class. (hires_ms): New class. * strace.cc (strace::microseconds): Use hires_us class. * times.cc (gettimeofday): Use hires-ms class. (hires_us::prime): Renamed from hires::prime. (hires_us::usecs): Renamed from hires:usecs. (hires_ms::prime): New method. (hires_ms::usecs): New method. (hires_ms::~hires_ms): New destructor.
Diffstat (limited to 'winsup/cygwin/hires.h')
-rw-r--r--winsup/cygwin/hires.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h
index c341aa287..611b2df0d 100644
--- a/winsup/cygwin/hires.h
+++ b/winsup/cygwin/hires.h
@@ -11,14 +11,37 @@ details. */
#ifndef __HIRES_H__
#define __HIRES_H__
-class hires
+#include <mmsystem.h>
+
+class hires_base
{
+ protected:
int inited;
+ virtual void prime () {}
+ public:
+ virtual LONGLONG usecs (bool justdelta) {return 0LL;}
+ virtual ~hires_base () {}
+};
+
+class hires_us : hires_base
+{
LARGE_INTEGER primed_ft;
LARGE_INTEGER primed_pc;
double freq;
- void prime () __attribute__ ((regparm (1)));
+ void prime ();
+ public:
+ LONGLONG usecs (bool justdelta);
+};
+
+class hires_ms : hires_base
+{
+ DWORD initime_ms;
+ LARGE_INTEGER initime_us;
+ UINT minperiod;
+ void prime ();
public:
- LONGLONG usecs (bool justdelta) __attribute__ ((regparm (2)));
+ LONGLONG usecs (bool justdelta);
+ ~hires_ms ();
};
+
#endif /*__HIRES_H__*/