From 1f8fd5a5c9d15e8c2553826437ab6292e3c8e028 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 14 Apr 2008 17:34:16 +0000 Subject: * unix/tclUnixTime.c (TclpGetClicks, Tcl_GetTime): Removed obsolete use of 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197]. --- ChangeLog | 6 ++++++ unix/tclUnixTime.c | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9c3993..a69203e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-14 Kevin B. Kenny + + * unix/tclUnixTime.c (TclpGetClicks, Tcl_GetTime): Removed + obsolete use of 'struct timezone' in the call to 'gettimeofday'. + [Bug 1942197]. + 2008-04-14 Don Porter * generic/tclExecute.c: Plug memory leak introduced in the diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index e4ac865..6a42d97 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTime.c,v 1.15.2.6 2007/04/21 19:52:15 kennykb Exp $ + * RCS: @(#) $Id: tclUnixTime.c,v 1.15.2.7 2008/04/14 17:34:17 kennykb Exp $ */ #include "tclInt.h" @@ -97,13 +97,12 @@ TclpGetClicks() struct tms dummy; #else struct timeval date; - struct timezone tz; #endif #ifdef NO_GETTOD now = (unsigned long) times(&dummy); #else - gettimeofday(&date, &tz); + gettimeofday(&date, NULL); now = date.tv_sec*1000000 + date.tv_usec; #endif @@ -250,9 +249,8 @@ Tcl_GetTime(timePtr) Tcl_Time *timePtr; /* Location to store time information. */ { struct timeval tv; - struct timezone tz; - (void) gettimeofday(&tv, &tz); + (void) gettimeofday(&tv, NULL); timePtr->sec = tv.tv_sec; timePtr->usec = tv.tv_usec; } -- cgit v0.12