aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-04-05 20:36:17 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-06 11:43:23 -0300
commit0b826ef43e8ecb12bdf2ca4cd78ec193279cf6d4 (patch)
treeba7922ae1412aaa34b2f210738b8573957cc53e4
parentdfb7d826ac5d9a4332a0f673ec3a6e7d69a27f1b (diff)
downloadrneovim-0b826ef43e8ecb12bdf2ca4cd78ec193279cf6d4.tar.gz
rneovim-0b826ef43e8ecb12bdf2ca4cd78ec193279cf6d4.tar.bz2
rneovim-0b826ef43e8ecb12bdf2ca4cd78ec193279cf6d4.zip
Add comments and fix `os_microdelay` call
-rw-r--r--src/os/time.h12
-rw-r--r--src/os_unix.c2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/os/time.h b/src/os/time.h
index f8e65e0c47..42feaa3eba 100644
--- a/src/os/time.h
+++ b/src/os/time.h
@@ -4,9 +4,21 @@
#include <stdint.h>
#include <stdbool.h>
+/// Initializes the time module
void time_init(void);
+
+/// Sleeps for a certain amount of milliseconds
+///
+/// @param milliseconds Number of milliseconds to sleep
+/// @param ignoreinput If true, allow a SIGINT to interrupt us
void os_delay(uint64_t milliseconds, bool ignoreinput);
+
+/// Sleeps for a certain amount of microseconds
+///
+/// @param microseconds Number of microseconds to sleep
+/// @param ignoreinput If true, allow a SIGINT to interrupt us
void os_microdelay(uint64_t microseconds, bool ignoreinput);
+
#endif // NEOVIM_OS_TIME_H
diff --git a/src/os_unix.c b/src/os_unix.c
index 98521fe682..5da3c6fb3f 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -85,7 +85,7 @@ void mch_write(char_u *s, int len)
{
ignored = (int)write(1, (char *)s, len);
if (p_wd) /* Unix is too fast, slow down a bit more */
- os_microdelay(p_wd, 0);
+ os_microdelay(p_wd, false);
}
/*