evutil_time.c

Branch


Log

Author Commit Date CI Message
Cœur eec47a67 2024-04-30T15:59:58 Fix typos (#1634)
Azat Khuzhin 317911a1 2024-02-18T20:39:12 Fix util/monotonic_prc_fallback under FreeBSD Looks like there was garbage, since evutil_configure_monotonic_time_() does not reset evutil_monotonic_timer structure, while in case of fallback it uses two fields from it: - last_time - adjust_monotonic_clock Fixes: https://github.com/libevent/libevent/issues/1495
MKCKR 00b92f42 2021-02-16T13:26:44 fix compile error in VS2012 in evutil_gettimeofday() Move static variable definition before other statement, to prevent compile error in VS2012. Fixes: #1135
Nick Grifka f0b3160f 2020-04-27T15:02:25 evutil_time: improve evutil_gettimeofday on Windows If present, use GetSystemTimePreciseAsFileTime instead of GetSystemTimeAsFileTime. Available since Windows 8.
yuangongji 6412f34f 2019-12-27T17:53:28 evutil_time: Implements usleep() using wait funtion on Windows
yuangongji 148d12ad 2019-09-19T15:24:51 evutil_time: detect and use _gmtime64_s()/_gmtime64()
Azat Khuzhin 35258a1f 2018-06-19T10:18:46 Replace all EVENT_HAVE with EVENT__HAVE (EVENT__HAVE_USLEEP)
Philip Prindeville 33baa4e5 2018-03-28T08:25:28 Avoid possible SEGVs in select() (in unit tests) 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
Azat Khuzhin 4798de6c 2016-12-22T14:55:33 test: fix util/date_rfc1123 under win32 Refs: #417 v2: check when gmtime() returns NULL v3: fix overflow cases
Azat Khuzhin 4545807d 2016-12-19T10:22:51 Fix UB in evutil_date_rfc1123() 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
Vis Virial db60ade8 2016-11-10T21:58:15 http: do not use local settings for Date header
Azat Khuzhin 3e75194c 2016-12-06T11:58:16 evutil_time: include <unistd.h> when there is only sleep()/usleep()
Andrea Shepard f2645f80 2014-11-19T12:18:05 Implement new/free for struct evutil_monotonic_timer and export monotonic time functions
Nick Mathewson 911abf3d 2013-08-19T10:11:21 Check CLOCK_MONOTONIC_* at runtime if needed. (We need this to avoid compile errors on cygwin. Fixes github issue 75.)
Nick Mathewson 85a40040 2013-05-01T13:37:57 Add regress_finalize to makefile.nmake
Nick Mathewson 9be54680 2012-08-02T12:35:49 Avoid unused-var warning on systems with clock_gettime but without CLOCK_MONOTONIC_COARSE
Nick Mathewson 630f077c 2012-04-26T11:56:59 Simple unit tests for monotonic timers
Nick Mathewson 2c470452 2012-04-23T13:33:25 Implement fast/precise monotonic clocks on Windows This uses code from libutp, which was released under the MIT license; see evutil_time.c and LICENSE changes.
Nick Mathewson f5e4eb05 2012-04-20T13:14:10 Refactor monotonic timer handling into a new type and set of functions; add a gettimeofday-based ratcheting implementation Now, event.c can always assume that we have a monotonic timer; this makes event.c easier to write.
Nick Mathewson 71bca50f 2012-04-20T12:27:12 Split out time-related prototypes into time-internal.h
Nick Mathewson c4194854 2012-04-20T12:19:03 Split out time-related evutil functions into a new evutil_time.c