summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixTime.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge zipfsjan.nijtmans2017-01-161-1/+1
|\
| * Merge bug_b87ad7e914sebres2017-01-091-1/+1
| |\
| | * Fix for [b87ad7e9146832d505f9a430d779c5313c440256|b87ad7e914], rebased to ↵bug_b87ad7e914jan.nijtmans2017-01-091-1/+1
| | |\ | | | | | | | | | | | | | | | | core-8-5-branch (who said fossil doesn't have 'rebase'...), and moved the definition of "struct _timeb t" to the top of the function. This branch is ready to be merged to core-8-5-branch, it looks good to me. Thanks to sebres (Dipl. Ing. Sergey G. Brester)
| | | * [win] bug fix in NativeGetTime: each call of it blurs current performance ↵sebres2017-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | counters actualized in calibration thread in UpdateTimeEachSecond; This entails that sometimes sporadically time-drifts resp. jump-esque time-shifts occurred, what for example produces very confusing results during time measurement. [unix] wrong cast fixed in TclpGetWideClicks: multiplication with 1000000 in long int may cause overflow See ticket b87ad7e9146832d505f9a430d779c5313c440256
| | | * Simplify use of "struct" keyword in many places.jan.nijtmans2016-06-301-1/+1
| | |/ | |/|
* | | Merge core-8-6-branch. upstream androwish modifications.jan.nijtmans2016-09-261-0/+61
| | |
* | | Put back the stub entries for TclpGetDate/TclpLocaltime/TclpGmtime. Although ↵jan.nijtmans2015-12-211-0/+197
| | | | | | | | | | | | those functions are dead (they will be removed in Tcl 9, already done in the "novem" branch), removing those functions is a good idea, this cannot be done in any 8.x release. It hinders the acceptance of a "zipfs" TIP, therefore this change should not be part of the "androwish" change-set.
* | | Merge trunk. jan.nijtmans2015-08-211-197/+0
|/ / | | | | Throw away TclpGetDate, TclpLocaltime and TclpGmtime and all related dead code. It makes the androwish binary (somewhat) smaller.
* | Remove a number of eol-spaces. No change in functionality.jan.nijtmans2014-11-141-1/+1
| |
* | Remove unused macros.dgp2014-09-051-3/+0
| |
* | Another memory leak, and one Tcl_Free -> ckfreejan.nijtmans2013-01-251-1/+1
| |
* | [Bug 3514475]: remove TclpGetTimeZone and TclpGetTZNamebug_3514475jan.nijtmans2012-04-031-116/+0
| |
* | Remove Tclp(Local|Gm)time_unix forwarders, the same can be done directlyjan.nijtmans2011-03-251-20/+0
|\ \ | |/
| * fix genStubs.tcl in one place where it generated "void *" in stead of "VOID *"jan.nijtmans2011-03-251-24/+4
| |\ | | | | | | | | | Remove Tclp(Local|Gm)time_unix forwarders, the same can be done directly Some more void -> VOID transitions
| | * Remove Tclp(Local|Gm)time_unix forwarders, the same can be done directlyjan.nijtmans2011-03-251-145/+136
| | | | | | | | | Some void -> VOID transitions
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ \ | |/ / | | | cause more harm than good. Purged them (except in zlib files).
| * | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ \ | | |/ | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * * unix/tclUnixTime.c (TclpGetClicks, Tcl_GetTime): RemovedKevin B Kenny2008-04-141-5/+3
| | | | | | | | | | | | | | | obsolete use of 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197].
| | * * generic/tclInt.decls: Yet another round of attemptingKevin B Kenny2007-04-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: to get the correct type signature * unix/tclUnixPort.h: for TclpLocaltime and TclpGmtime. * unix/tclUnixTime.c: CONST TclpTime_t is a 'time_t *CONST' * win/tclWinTime.c: and not a 'CONST time_t*'! * generic/tclIntDecls.h: [Bug 1677275] * generic/tclIntPlatDecls.h: Regenerated.
| | * * generic/tclEvent.c (Tcl_CreateThread): Replaced some calls todgp2007-03-191-3/+3
| | | | | | | | | | | | | | | | | | * generic/tclPkg.c (CheckVersion): Tcl_Alloc() with calls to * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better * win/tclAppInit.c (setargv): supports memory debugging.
| | * replaced 'long' times with wides, to cope with Win64Kevin B Kenny2005-03-151-2/+2
| | |
| | * added CONST to TclpLocaltime and TclpGmtime param throughoutKevin B Kenny2004-10-281-5/+5
| | |
| | * * generic/tclInt.decls: Restored TclpTime_t kludge to all Kevin B Kenny2004-05-171-17/+18
| | | | | | | | | | | | | | | | | | | | | * generic/tclIntPlatDecls.h: places where it appeared before the * unix/tclUnixPort.h changes of 14 May, because use of * unix/tclUnixTime.h native time_t in its place requires * win/tclWinTime.h: the 8.5 header reforms. [Bug #955146]
| | * 2004-05-14 Kevin B. Kenny <kennykb@acm.org> Kevin B Kenny2004-05-141-87/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls.
| * | * unix/tclUnixTime.c (NativeGetTime): Removed obsolete use ofKevin B Kenny2008-04-141-3/+2
| | | | | | | | | | | | 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197].
* | | Squelch unnecessary parens, shorten overlong comment lines.dkf2010-03-141-15/+15
| | |
* | | [ tcl-Feature Requests-2958832 ] Furthernijtmans2010-02-251-2/+2
| | | | | | | | | | | | | | | | | | speed-up of ouster-hash function. Eliminate various unnecessary (ClientData) type casts.
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-5/+5
| | |
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-7/+7
| | |
* | | * unix/tclUnixTime.c (NativeGetTime): Removed obsolete use ofKevin B Kenny2008-04-141-3/+2
|/ / | | | | | | 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197].
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | * unix/tclUnixTime.c (TclpWideClicksToNanoseconds): fix issues withdas2007-11-101-5/+5
| | | | | | | | * generic/tclInt.h: int64_t overflow.
* | Tidying up.dkf2007-08-031-3/+2
| |
* | Eliminate use of (VOID*) casts when calling memset or memcpy.dkf2007-04-171-5/+3
| |
* | Complete the purge of K&R function definitions from manually-written code.dkf2007-04-161-2/+3
| |
* | * generic/tclBasic.c (Tcl_CreateMathFunc): Replaced somedgp2007-03-191-3/+3
| | | | | | | | | | | | | | * generic/tclEvent.c (Tcl_CreateThread): calls to Tcl_Alloc() * generic/tclObj.c (UpdateStringOfBignum): with calls to * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better * win/tclAppInit.c (setargv): supports memory debugging.
* | * generic/tclClock.c (ClockClicksObjCmd): add support for Darwindas2006-08-211-1/+93
| | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_TimeObjCmd): nanosecond resolution timer * generic/tclInt.h: to [clock clicks] and [time] * unix/configure.in (Darwin): when TCL_WIDE_CLICKS defined. * unix/tclUnixTime.c (TclpGetWideClicks, TclpWideClicksToNanoseconds): * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* | ANSIfydkf2005-11-021-43/+44
| |
* | Getting more systematic about styledkf2005-07-201-180/+190
| |
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | * generic/tclStubInit.c: Regenerated the stubs support code fromandreas_kupries2005-01-211-16/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclDecls.h: the modified tcl.decls (TIP #233, see below). * doc/GetTime.3: Implemented TIP #233, i.e. the * generic/tcl.decls: 'Virtualization of Tcl's Sense of Time'. * generic/tcl.h: Declared, implemented, and documented the * generic/tclInt.h: specified new API functions. Moved the * unix/tclUnixEvent.c: native (OS) access to time information * unix/tclUnixNotfy.c: into standard handler functions. Inserted * unix/tclUnixTime.c: hooks calling on the handlers where native * win/tclWinNotify.c: access was done before, and where scaling * win/tclWinTime.c: between domains (real/virtual) is required.
* | many more TIP 173 changesKevin B Kenny2004-09-271-56/+1
| |
* | 2004-05-14 Kevin B. Kenny <kennykb@acm.org> Kevin B Kenny2004-05-141-89/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls.
* | Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):
* | * generic/tclIntDecls.h: Removed TclpTime_t. It wasn't really needed,rmax2004-03-181-6/+4
| | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: but caused warnings related to * generic/tclInt.decls: strict aliasing with GCC 3.3. * generic/tclClock.c: * generic/tclDate.c: * generic/tclGetDate.y: * win/tclWinTime.c: * unix/tclUnixTime.c:
* | Corrected a bug in conversion of non-ASCII chars in the format string.Kevin B Kenny2003-05-191-3/+7
| |
* | * unix/tclUnixTime.c: fixed typo.das2003-05-191-2/+2
| |
* | * compat/strftime.c: Modified TclpStrftime to return its Kevin B Kenny2003-05-181-10/+23
|/ | | | | | | | * generic/tclClock.c: result in UTF-8 encoding, and removed * mac/tclMacTime.c: the conversion from system encoding to * unix/tclUnixTime.c: UTF-8 from [clock format]. Needed to * win/tclWinTime.c: avoid double conversion of the timezone name on Windows systems. [Bug 624408]
* Global symbols are now all either prefixed with 'tcl' (or 'Tcl' or ...) or ↵dkf2002-07-191-21/+17
| | | | have file-scope.