diff options
author | Christopher Faylor <me@cgf.cx> | 2010-05-26 18:48:17 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-05-26 18:48:17 +0400 |
commit | fca8f35f1133a9442f3301aef613e7d79ee3a343 (patch) | |
tree | 5b8745b5dbd1e2e71a405c814a4e9d7dc21a8e7e /winsup/cygwin/hires.h | |
parent | 1ee8d76ca047d18c6462d70850fc64de35c631f5 (diff) |
* hires.h (hires_base::reset): New function.
(hires_us): Specify that hires_base is a public import.
(hires_ms): Ditto.
* times.cc (gtod): Move earlier in file.
(settimeofday): Reset gtod so that base will be subsequently recalculated.
Diffstat (limited to 'winsup/cygwin/hires.h')
-rw-r--r-- | winsup/cygwin/hires.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h index e91df0690..6a7fe8c72 100644 --- a/winsup/cygwin/hires.h +++ b/winsup/cygwin/hires.h @@ -1,6 +1,6 @@ /* hires.h: Definitions for hires clock calculations - Copyright 2002, 2003, 2004, 2005, 2009 Red Hat, Inc. + Copyright 2002, 2003, 2004, 2005, 2009, 2010 Red Hat, Inc. This file is part of Cygwin. @@ -25,9 +25,11 @@ class hires_base { protected: int inited; + public: + void reset() {inited = false;} }; -class hires_us : hires_base +class hires_us : public hires_base { LARGE_INTEGER primed_ft; LARGE_INTEGER primed_pc; @@ -37,7 +39,7 @@ class hires_us : hires_base LONGLONG usecs (bool justdelta); }; -class hires_ms : hires_base +class hires_ms : public hires_base { LONGLONG initime_ns; void prime (); |