summaryrefslogtreecommitdiffstats
path: root/win/tclWinTime.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge bug_b87ad7e914sebres2017-01-091-21/+39
|\
| * Fix for [b87ad7e9146832d505f9a430d779c5313c440256|b87ad7e914], rebased to ↵bug_b87ad7e914jan.nijtmans2017-01-091-21/+39
| |\ | | | | | | | | | | | | 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-17/+37
| |/ |/| | | | | | | | | | | | | 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
* | more internal use of size_t (in stead of int)jan.nijtmans2016-11-291-1/+1
| |
* | Fix harmless gcc warning message: using "unsigned" doesn't serve any ↵jan.nijtmans2016-11-111-1/+1
| | | | | | | | purpose, actually.
* | Simplify use of "struct" keyword in many places.jan.nijtmans2016-06-301-2/+2
| |
* | Fix for FreeBSD, and remove support for older FreeBSD versions. Patch by ↵jan.nijtmans2013-05-191-2/+2
|\ \ | |/ | | | | Pietro Cerutti
| * Fix for FreeBSD, and remove support for older FreeBSD versions. Patch by ↵jan.nijtmans2013-05-191-2/+2
| |\ | | | | | | | | | Pietro Cerutti
| | * - eliminate compiler warning when compiling with Visual Studio.jan.nijtmans2013-05-171-2/+2
| | | | | | | | | - Make sure that _ftime() from msvcrt.dll is used, not ftime() from mingw (which might use 64-bit time_t)
| * | make some more internal tables constjan.nijtmans2012-04-231-3/+3
| |\ \ | | |/
| | * make some more internal tables constjan.nijtmans2012-04-231-3/+3
| | | | | | | | | On cygwin, install dll's in /usr/bin, not in /usr/lib
| | * [Bug 3388350] mingw64 compiler warningsjan.nijtmans2011-08-151-1/+1
| | |
* | | [Bug 3514475]: remove TclpGetTimeZone and TclpGetTZNamebug_3514475jan.nijtmans2012-04-031-116/+0
| | |
* | | 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.
| | * * generic/tclInt.decls: Yet another round of attemptingKevin B Kenny2007-04-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| | * * win/makefile.vc: Updated MSVC build to properly deal withpatthoyts2006-09-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * win/nmakehlp.c: MSVC8 and AMD64 target. Backport from 8.5 * win/rules.vc: * generic/tcl.h: Fixed stat definition for MSVC8 AMD64. * win/tclWinSock.c: Casting type police. * win/tclWinTime.c:
| | * Enable building Tcl with Microsoft's latest compiler offeringpatthoyts2006-06-141-9/+9
| | | | | | | | | | | | | | | | | | (VS2005). We have to handle a number of oddities as they have deprecated most of the standard C library and now generate manifest files to be linked into the binaries. SF bug #1424909
| | * * win/tclWinTime.c (TclpGetDate): use time_t for 'time'hobbs2005-03-301-9/+6
| | |
| | * 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-3/+3
| | |
| | * * generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw Kevin B Kenny2004-06-051-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build works again. * generic/tclInt.decls: Changes to the tests for * generic/tclIntPlatDecls.h: clock frequency in Tcl_WinTime * generic/tclStubInit.c: so that any clock frequency * tests/platform.test (platform-1.3): is accepted provided that * win/tclWin32Dll.c (TclWinCPUID): all CPU's in the system share * win/tclWinTest.c (TestwincpuidCmd): a common chip, and hence, * win/tclWinTime.c (Tcl_GetTime): presumably, a common clock. This change necessitated a small burst of assembly code to read CPU ID information, which was added as TclWinCPUID in the internal Stubs. To test this code in the common case of a single-processor machine, a 'testwincpuid' command was added to tclWinTest.c, and a test case in platform.test. Thanks to Jeff Godfrey and Richard Suchenwirth for reporting this bug. [Bug #976722]
| | * * generic/tclInt.decls: Restored TclpTime_t kludge to all Kevin B Kenny2004-05-171-8/+11
| | | | | | | | | | | | | | | | | | | | | * 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-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| | * Corrected use of types to make compilation compatible with VC++5.Kevin B Kenny2003-04-151-40/+38
| | |
| | * Fixed Bug 710310 (duplicate test numbers in clock.test). Made major Kevin B Kenny2003-04-121-121/+240
| | | | | | | | | | | | | | | changes to tclWinTime.c and related code to improve loop filter stability.
* | | Unnecessary type casts, See Tcl [Patch #2997087]nijtmans2010-05-111-2/+2
| | | | | | | | | | | | Don't duplicate CYGWIN timezone #define from tclPort.h in tclWinPort.h
* | | * win/tclWinDde.c: VC++ 6.0 doesn't havenijtmans2010-01-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * win/tclWinReg.c PDWORD_PTR * win/tclWinThrd.c: Fix various minor gcc warnings. * win/tclWinTime.c * win/tclWinConsole.c Put channel type definitions * win/tclWinChan.c in static const memory * win/tclWinPipe.c * win/tclWinSerial.c * win/tclWinSock.c * generic/tclIOGT.c * generic/tclIORChan.c * generic/tclIORTrans.c * unix/tclUnixChan.c * unix/tclUnixPipe.c * unix/tclUnixSock.c * unix/configure (regenerated with autoconf 2.59) * tests/info.test: Make test independant from tcltest implementation.
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-4/+4
| | |
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-5/+4
|/ /
* | ANSIfydkf2005-11-041-56/+60
| |
* | Applied patch #1096916 to support building with MSVC 8.patthoyts2005-11-031-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * generic/regerror.c: Avoid use of reserved word. * generic/tcl.h: Select the right Tcl_Stat structure * generic/tclDate.c: Casts to handle 64 bit time_t case. * tests/env.test: Include essential envvar on Win32 * win/nmakehlp.c: Handle new return codes. * win/makefile.vc: Use the selected options. * win/rules.vc: Check options are applicable * win/tclWinPort.h: Disable deprecated function warnings * win/tclWinSock.c: Provide default value to avoid warning. * win/tclWinTime.c: Add casts to handle 64bit time_t type.
* | Getting more systematic about styledkf2005-07-241-467/+427
| |
* | 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-3/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | * generic/tclTimer.c: Removed a premature optimisation thatKevin B Kenny2004-09-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attempted to store the assoc data in the client data; the optimisation caused a bug that [after] would overwrite its imports. [Bug 1016167] * library/clock.tcl (InitTZData, ClearCaches): Changed so that the in-memory time zone :UTC (and its aliases) always gets reinitialised, in case tzdata is absent. [Bug 1019537, 1023779] * library/tzdata/*: Regenerated. * tests/clock.test (clock-31.*, clock-39.1): Corrected a problem where the 'system' locale tests fail on a non-English Windows machine. [Bug 1023761]. Added a test to make sure that alias time zones load correctly. [Bug 1023779]. * tools/tclZIC.tcl (writeLinks): Corrected a problem where alias time zone names were written incorrectly, causing them to fail to load at run time. [Bug 1023779]. * win/tclWinTime.c (Tcl_GetTime): Eliminated CPUID tests on Win64 - assuming that HAL vendors now do a better job of keeping the performance counters synchronized among CPU's. [Bug 1020445]
* | * generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw Kevin B Kenny2004-06-051-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build works again. * generic/tclDecls.h: Changes to the tests for * generic/tclInt.decls: clock frequency in * generic/tclIntDecls.h: Tcl_WinTime * generic/tclIntPlatDecls.h: so that any clock frequency * generic/tclPlatDecls.h: is accepted provided that * generic/tclStubInit.c: all CPU's in the system share * tests/platform.test (platform-1.3): a common chip, and hence, * win/tclWin32Dll.c (TclWinCPUID): presumably, a common clock. * win/tclWinTest.c (TestwincpuidCmd) This change necessitated a * win/tclWinTime.c (Tcl_GetTime): small burst of assembly code to read CPU ID information, which was added as TclWinCPUID in the internal Stubs. To test this code in the common case of a single-processor machine, a 'testwincpuid' command was added to tclWinTest.c, and a test case in platform.test. Thanks to Jeff Godfrey and Richard Suchenwirth for reporting this bug. [Bug #976722]
* | 2004-05-14 Kevin B. Kenny <kennykb@acm.org> Kevin B Kenny2004-05-141-2/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | * win/tclWinTime.c: If the Tcl_ExitProc (StopCalibration) isdavygrvy2004-04-231-2/+6
| | | | | | | | | | called from the stack frame of DllMain's PROCESS_DETACH, the wait operation should timeout and continue.
* | Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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):
* | Made HEAD build on Windows VC++ again.Kevin B Kenny2004-03-191-10/+10
| |
* | * generic/tclIntDecls.h: Removed TclpTime_t. It wasn't really needed,rmax2004-03-181-10/+9
| | | | | | | | | | | | | | | | | | | | * 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:
* | * win/tclWinFile.c (TclpUtime) : utimbuf struct not a problemdavygrvy2003-12-161-1/+14
| | | | | | | | | | | | | | | | | | with Borland. * win/tclWinTime.c (TclpGetDate) : Borland's localtime() has a slight behavioral difference. From Helmut Giese <hgiese@ratiosoft.com> [Patch 758097].
* | * win/tclWinTime.c: Changed use of '_timezone' to 'timezone' asdavygrvy2003-08-271-7/+5
| | | | | | | | | | this difference is already adjusted for in tclWinPort.h. Removed unreferenced posixEpoch file-scope global.
* | Add tests to detect and avoid division by zero in the windows precisiondrh2003-05-241-4/+20
| | | | | | | | timer calibration logic.
* | * compat/strftime.c: Modified TclpStrftime to return its Kevin B Kenny2003-05-181-1/+2
| | | | | | | | | | | | | | | | * 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]
* | Corrected use of types to make compilation compatible with VC++5.Kevin B Kenny2003-04-151-37/+37
| |
* | * win/configure: Regen.mdejong2003-04-141-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * win/configure.in: Add check for FINDEX_INFO_LEVELS from winbase.h, known to be a problem in VC++ 5.2. Define HAVE_NO_FINDEX_ENUMS if the define does not exist. * win/tclWinFile.c: Put declarations for FINDEX_INFO_LEVELS and FINDEX_SEARCH_OPS inside a check for HAVE_NO_FINDEX_ENUMS so that these are not declared twice. This fixes the Mingw build. * win/tclWinTime.c: Rework the init of timeInfo so that the number or initializers matches the declaration. This was broken under Mingw. Add cast to avoid compile warning when calling the AccumulateSample function.
* | Implemented TIP #124 (clock clicks -microseconds and Tcl_WideInt Kevin B Kenny2003-04-121-121/+240
|/ | | | | | return values). Fixed Bug 710310 (duplicate test numbers in clock.test). Made major changes to tclWinTime.c and related code to improve loop filter stability.