summaryrefslogtreecommitdiffstats
path: root/test/src/timer.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove extraneous parens around return arguments.Jason Evans2017-01-211-1/+1
| | | | This resolves #540.
* Update brace style.Jason Evans2017-01-211-10/+8
| | | | | | | Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
* Remove leading blank lines from function bodies.Jason Evans2017-01-131-2/+0
| | | | This resolves #535.
* Refactor out signed/unsigned comparisons.Jason Evans2016-03-151-3/+2
|
* Refactor time_* into nstime_*.Jason Evans2016-02-221-8/+8
| | | | | | | Use a single uint64_t in nstime_t to store nanoseconds rather than using struct timespec. This reduces fragility around conversions between long and uint64_t, especially missing casts that only cause problems on 32-bit platforms.
* Flesh out time_*() API.Jason Evans2016-02-201-32/+8
|
* Fix MinGW-related portability issues.Jason Evans2015-07-231-2/+2
| | | | | | | | | | | | | Create and use FMT* macros that are equivalent to the PRI* macros that inttypes.h defines. This allows uniform use of the Unix-specific format specifiers, e.g. "%zu", as well as avoiding Windows-specific definitions of e.g. PRIu64. Add ffs()/ffsl() support for compiling with gcc. Extract compatibility definitions of ENOENT, EINVAL, EAGAIN, EPERM, ENOMEM, and ENORANGE into include/msvc_compat/windows_extra.h and use the file for tests as well as for core jemalloc code.
* Add timer support for Windows.Jason Evans2015-07-131-7/+18
|
* use CLOCK_MONOTONIC in the timer if it's availableDaniel Micay2015-03-131-0/+17
| | | | | | Linux sets _POSIX_MONOTONIC_CLOCK to 0 meaning it *might* be available, so a sysconf check is necessary at runtime with a fallback to the mandatory CLOCK_REALTIME clock.
* avoid conflict with the POSIX timer_t typeDaniel Micay2014-09-081-4/+4
| | | | It hits a compilation error with glibc 2.19 without a rename.
* Add a simple timer implementation for use in benchmarking.Jason Evans2014-09-081-0/+57