summaryrefslogtreecommitdiffstats
path: root/win/tclWinTime.c
Commit message (Collapse)AuthorAgeFilesLines
* Some more *A() -> *W() Win32 API changes, making Unicode calls Explicit.jan.nijtmans2019-09-191-2/+2
|
* Don't let Tcl compilation depend on USE_32BIT_TIME_T any more: Microsoft ↵jan.nijtmans2019-09-071-6/+19
|\ | | | | | | | | could discontinue this macro any moment, then we are prepared .... As a bonus: time_t is now allowed to be 64-bit internally, without effect on the C API (like stub-enabled extensions)
| * Don't let Tcl depend on USE_32BIT_TIME_T any more: If your compiler supports ↵jan.nijtmans2019-09-061-6/+19
| | | | | | | | | | it, time_t will be 64-bit internally. But at API-level, time_t will still be restricted to 32-bit on Win32 (Not on Win64). This keeps Tcl_StatBuf the same (unless USE_64BIT_TIME_T is defined), so 64-bit times still cannot be used everywhere.
* | Fix [8566dc22f9]: various spelling fixes in commentsjan.nijtmans2019-08-221-1/+1
|\ \ | |/
| * Fix [8566dc22f9]: various spelling fixes in commentsjan.nijtmans2019-08-221-1/+1
| |
* | Add one more knownMsvcBug marker, for a test-case which sometimes fails in ↵jan.nijtmans2019-08-021-1/+1
| | | | | | | | | | Travis. Fix a struct initializer, add two typecasts and a "const", which can generate gcc warnings with some compiler options.
* | Fix some gcc/MSVC (harmless) compiler warnings. Remove some unnecessary ↵jan.nijtmans2019-03-071-11/+11
| | | | | | | | end-of-line spacing
* | merge 8-5-timerate (?max-count?, break possibility, diverse fixes) + windows ↵sebres2019-02-131-51/+120
|\ \ | |/ | | | | time-calibration cycle optimization [f6637d3dd8] (clock ticks never backwards, more precise and smooth drifting)
| * merge 8.5 (note: to avoid too many conflicts, merged using `fossil merge ↵sergey.brester2019-02-121-0/+9
| |\ | | | | | | | | | --baseline 0055a16a8b core-8-5-branch`)
| * | [win32] optimized calibration cycle (makes Tcl for windows "RTS" resp. ↵sebres2017-05-231-53/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NRT-capable): - the clock ticks never backwards (avoid it by negative drifts using comparison of times before and after calibration); - more precise, smooth/soft drifting (avoids too large drifts, already after 10 iterations the drift gets fewer as 0.1 microseconds); - because of more accurate drifting (aspire to the smallest difference), we can prolong calibration interval (up to 10 seconds by small tdiff-value); Closes ticket [b7b707a310ea42e9f1b29954ee8ca13ae91ccabe] "[win32] NRT-only - NativeGetTime backwards time-drifts bug"
| * | back-ported branch sebres-8-6-timerate (new command "timerate" for 8.5)sebres2017-05-161-39/+232
| |\ \
* | \ \ merge 8.6(.9), conflicts resolvedsergey.brester2019-02-071-0/+9
|\ \ \ \ | |_|/ / |/| | |
| * | | Fix conflict with timezone() function in some MSVC versionsjan.nijtmans2019-01-031-0/+1
| |\ \ \ | | | |/ | | |/|
| | * | Fix conflict with timezone() function in some MSVC versionsjan.nijtmans2019-01-031-0/+1
| | | |
| * | | Fix [3cf3a939d32707e100e06e23806e13569856286a|3cf3a939d3]: timezone ↵jan.nijtmans2018-12-301-0/+8
| |\ \ \ | | |/ / | | | | | | | | | | | | deprecated in vc2017. Also remove unix/config.status.lineno, which was -apparently - checked-in by accident in previous commit
| | * | Fix [3cf3a939d32707e100e06e23806e13569856286a|3cf3a939d3]: timezone ↵jan.nijtmans2018-12-301-0/+8
| | |/ | | | | | | | | | deprecated in vc2017
* | | back-ported branch sebres_trunk_timerate (new command "timerate" for 8.6)sebres2017-05-091-39/+232
|\ \ \ | |/ / |/| |
| * | [win] accomplished winTime module using very fast wide clicks, with ↵sebres2017-02-091-7/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | denominator scale to/from microseconds, and therefore more precise "timerate" results under windows (using similar mechanisms as by Mac OSX). Especially multi-threaded, because it works without lock opposite to microseconds (that use crictical section, because of the calibration thread). The reason for usage of wide clicks instead microseconds explains following example (shows 20% performance deference): % timerate -calibrate {} % timerate {clock microseconds} 5000 0.297037 µs/# 14465901 # 3366585 #/sec 4296.906 nett-ms % timerate {clock clicks} 5000 0.247797 µs/# 16869084 # 4035554 #/sec 4180.116 nett-ms
| * | [timerate] bug fix: missing scale conversion by Mac OSX on platform where ↵sebres2017-02-091-33/+133
| | | | | | | | | | | | | | | | | | | | | high resolution clicks are not microseconds based; [win] use high resolution timer for the wide clicks and microseconds directly, prevent several forwards/backwards conversions; [win, unix, mac-osx] normalize some functions for common usage in different time units (clicks, micro- and nanoseconds)
| * | Merge bug_b87ad7e914sebres2017-01-091-21/+39
| |\ \ | | |/
* | | Merge bug_b87ad7e914sebres2017-01-091-21/+39
|\ \ \ | | |/ | |/|
| * | Fix for [b87ad7e9146832d505f9a430d779c5313c440256|b87ad7e914], rebased to ↵jan.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 TclpGetTZNamejan.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
| | |