diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-07-13 12:37:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-13 12:37:58 +0200 |
commit | 4013f670537246826dae738d5cb86fd075f59f82 (patch) | |
tree | e1b5f8e8327f585f5ca3fdc5353312645aee15a2 /src/nvim/os/time.c | |
parent | e1fae8f1fe940db6a0ecddfcf88afeaacf6bb9d4 (diff) | |
download | rneovim-4013f670537246826dae738d5cb86fd075f59f82.tar.gz rneovim-4013f670537246826dae738d5cb86fd075f59f82.tar.bz2 rneovim-4013f670537246826dae738d5cb86fd075f59f82.zip |
viml/profile: revert gettimeofday() #10488
e2ce5ff9d616 was proven to be bogus, so revert it.
close #10328
ref #10356
ref #10452
Diffstat (limited to 'src/nvim/os/time.c')
-rw-r--r-- | src/nvim/os/time.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c index 1094fbc946..4dd0614fe2 100644 --- a/src/nvim/os/time.c +++ b/src/nvim/os/time.c @@ -31,27 +31,6 @@ void time_init(void) uv_cond_init(&delay_cond); } -/// Gets the current time with microsecond (μs) precision. -/// -/// Subject to system-clock quirks (drift, going backwards, skipping). -/// But it is much faster than os_hrtime() on some systems. #10328 -/// -/// @see gettimeofday(2) -/// -/// @return Current time in microseconds. -int64_t os_utime(void) - FUNC_ATTR_WARN_UNUSED_RESULT -{ - uv_timeval64_t tm; - int e = uv_gettimeofday(&tm); - if (e != 0 || tm.tv_sec < 0 || tm.tv_usec < 0) { - return 0; - } - int64_t rv = tm.tv_sec * 1000 * 1000; // s => μs - STRICT_ADD(rv, tm.tv_usec, &rv, int64_t); - return rv; -} - /// Gets a high-resolution (nanosecond), monotonically-increasing time relative /// to an arbitrary time in the past. /// |