summaryrefslogtreecommitdiff
path: root/evutil_time.c
Commit message (Collapse)AuthorAgeFilesLines
* fix compile error in VS2012 in evutil_gettimeofday()MKCKR2021-02-171-3/+3
| | | | | | | Move static variable definition before other statement, to prevent compile error in VS2012. Fixes: #1135
* evutil_time: improve evutil_gettimeofday on WindowsNick Grifka2020-04-291-1/+19
| | | | | If present, use GetSystemTimePreciseAsFileTime instead of GetSystemTimeAsFileTime. Available since Windows 8.
* evutil_time: Implements usleep() using wait funtion on Windowsyuangongji2019-12-311-2/+16
|
* evutil_time: detect and use _gmtime64_s()/_gmtime64()yuangongji2019-09-191-5/+15
|
* Replace all EVENT_HAVE with EVENT__HAVE (EVENT__HAVE_USLEEP)Azat Khuzhin2018-06-191-1/+1
|
* Avoid possible SEGVs in select() (in unit tests)Philip Prindeville2018-03-301-1/+4
| | | | | | | | | | | | | | | | | Per the POSIX definition of select(): http://pubs.opengroup.org/onlinepubs/009696699/functions/pselect.html "Upon successful completion, the select() function may modify the object pointed to by the timout argument." If "struct timeval" pointer is a "static const", it could potentially be allocated in a RO text segment. The kernel would then try to copy back the modified value (with the time remaining) into a read-only address and SEGV. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Closes: #614
* test: fix util/date_rfc1123 under win32Azat Khuzhin2016-12-221-0/+1
| | | | | | Refs: #417 v2: check when gmtime() returns NULL v3: fix overflow cases
* Fix UB in evutil_date_rfc1123()Azat Khuzhin2016-12-221-11/+13
| | | | | | | | | As pointed in https://github.com/libevent/libevent/pull/417#issuecomment-267860738 "code is unsafe because in evutil_date_rfc1123() the pointer to the automatic variable struct tm cur is used outside the scope it defined." Checked with `clang -fsanitize=address -fsanitize-address-use-after-scope` and test that call evutil_date_rfc1123() with tm==NULL
* http: do not use local settings for Date headerVis Virial2016-12-191-0/+28
|
* evutil_time: include <unistd.h> when there is only sleep()/usleep()Azat Khuzhin2016-12-061-0/+7
|
* Implement new/free for struct evutil_monotonic_timer and export monotonic ↵Andrea Shepard2014-12-041-0/+50
| | | | time functions
* Check CLOCK_MONOTONIC_* at runtime if needed.Nick Mathewson2013-08-191-9/+10
| | | | | (We need this to avoid compile errors on cygwin. Fixes github issue 75.)
* Add regress_finalize to makefile.nmakerelease-2.1.3-alphaNick Mathewson2013-05-011-3/+3
|
* Avoid unused-var warning on systems with clock_gettime but without ↵Nick Mathewson2012-08-021-0/+2
| | | | CLOCK_MONOTONIC_COARSE
* Simple unit tests for monotonic timersNick Mathewson2012-04-261-8/+20
|
* Implement fast/precise monotonic clocks on WindowsNick Mathewson2012-04-261-25/+130
| | | | | This uses code from libutp, which was released under the MIT license; see evutil_time.c and LICENSE changes.
* Refactor monotonic timer handling into a new type and set of functions; add ↵Nick Mathewson2012-04-261-0/+235
| | | | | | | a gettimeofday-based ratcheting implementation Now, event.c can always assume that we have a monotonic timer; this makes event.c easier to write.
* Split out time-related prototypes into time-internal.hNick Mathewson2012-04-201-1/+0
|
* Split out time-related evutil functions into a new evutil_time.cNick Mathewson2012-04-201-0/+134