diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2014-07-16 12:46:07 -0400 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2014-07-16 12:46:07 -0400 |
| commit | 0412c17a6566a3cc5d324773abcf6e8a1ad40bc6 (patch) | |
| tree | 1b8beaf1d24f394efd0b6e0322d1efbb8515cf6f /src/nvim/os/time.c | |
| parent | e1075ffff94fe0ddc9eb90980ad798e68c090fc6 (diff) | |
| parent | 6d0f9417ec2e9dec9666fa9c7a9b5b890f25d36a (diff) | |
| download | rneovim-0412c17a6566a3cc5d324773abcf6e8a1ad40bc6.tar.gz rneovim-0412c17a6566a3cc5d324773abcf6e8a1ad40bc6.tar.bz2 rneovim-0412c17a6566a3cc5d324773abcf6e8a1ad40bc6.zip | |
Merge pull request #839 from aktau/platform-abstract-time-fn
viml: impl profiling on top of uv_hrtime()
Diffstat (limited to 'src/nvim/os/time.c')
| -rw-r--r-- | src/nvim/os/time.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c index 90a17aa513..00ffccfaa8 100644 --- a/src/nvim/os/time.c +++ b/src/nvim/os/time.c @@ -22,6 +22,15 @@ void time_init(void) uv_cond_init(&delay_cond); } +/// Obtain a high-resolution timer value +/// +/// @return a timer value, not related to the time of day and not subject +/// to clock drift. The value is expressed in nanoseconds. +uint64_t os_hrtime(void) +{ + return uv_hrtime(); +} + /// Sleeps for a certain amount of milliseconds /// /// @param milliseconds Number of milliseconds to sleep |