* 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.
This commit is contained in:
@ -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 ();
|
||||
|
Reference in New Issue
Block a user