aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event/loop.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /src/nvim/event/loop.h
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'src/nvim/event/loop.h')
-rw-r--r--src/nvim/event/loop.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/event/loop.h b/src/nvim/event/loop.h
index 65980c6c05..b2265a726d 100644
--- a/src/nvim/event/loop.h
+++ b/src/nvim/event/loop.h
@@ -4,8 +4,8 @@
#include <stdint.h>
#include <uv.h>
+#include "klib/klist.h"
#include "nvim/event/multiqueue.h"
-#include "nvim/lib/klist.h"
#include "nvim/os/time.h"
typedef void *WatcherPtr;
@@ -58,7 +58,7 @@ typedef struct loop {
// Poll for events until a condition or timeout
#define LOOP_PROCESS_EVENTS_UNTIL(loop, multiqueue, timeout, condition) \
do { \
- int remaining = timeout; \
+ int64_t remaining = timeout; \
uint64_t before = (remaining > 0) ? os_hrtime() : 0; \
while (!(condition)) { \
LOOP_PROCESS_EVENTS(loop, multiqueue, remaining); \
@@ -66,7 +66,7 @@ typedef struct loop {
break; \
} else if (remaining > 0) { \
uint64_t now = os_hrtime(); \
- remaining -= (int)((now - before) / 1000000); \
+ remaining -= (int64_t)((now - before) / 1000000); \
before = now; \
if (remaining <= 0) { \
break; \