This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Cygwin: timers: Simplify hires_ms and hires_ns


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=65091f0f35b29d5a043630fd877f0314a0779fb6

commit 65091f0f35b29d5a043630fd877f0314a0779fb6
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Nov 26 17:24:35 2018 +0100

    Cygwin: timers: Simplify hires_ms and hires_ns
    
    Drop hires_base and move inited into hires_ns.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/hires.h  | 11 ++---------
 winsup/cygwin/times.cc |  2 --
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h
index 04ee606..d07bf39 100644
--- a/winsup/cygwin/hires.h
+++ b/winsup/cygwin/hires.h
@@ -38,16 +38,9 @@ details. */
 /* # of millisecs per second. */
 #define MSPERSEC (1000L)
 
-class hires_base
+class hires_ns
 {
- protected:
   int inited;
- public:
-  void reset() {inited = false;}
-};
-
-class hires_ns : public hires_base
-{
   LARGE_INTEGER primed_pc;
   double freq;
   void prime ();
@@ -57,7 +50,7 @@ class hires_ns : public hires_base
   LONGLONG resolution();
 };
 
-class hires_ms : public hires_base
+class hires_ms
 {
  public:
   LONGLONG nsecs ();
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 11fb8f2..e890514 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -120,8 +120,6 @@ settimeofday (const struct timeval *tv, const struct timezone *tz)
       st.wMilliseconds = tv->tv_usec / (USPERSEC / MSPERSEC);
 
       res = -!SetSystemTime (&st);
-      gtod.reset ();
-
       if (res)
 	set_errno (EPERM);
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]