time.c File Reference
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
#include <limits.h>
#include <uv.h>
#include "nvim/os/input.h"
#include "nvim/event/loop.h"
#include "nvim/vim.h"
#include "nvim/main.h"


void time_init (void)
 Initializes the time module. More...
uint64_t os_hrtime (void)
void os_delay (uint64_t ms, bool ignoreinput)
void os_microdelay (uint64_t us, bool ignoreinput)
struct tm * os_localtime_r (const time_t *restrict clock, struct tm *restrict result) FUNC_ATTR_NONNULL_ALL
struct tm * os_localtime (struct tm *result) FUNC_ATTR_NONNULL_ALL
Timestamp os_time (void)

Function Documentation

void os_delay ( uint64_t  ms,
bool  ignoreinput 

Sleeps for ms milliseconds.

msNumber of milliseconds to sleep
ignoreinputIf true, only SIGINT (CTRL-C) can interrupt.
uint64_t os_hrtime ( void  )

Obtain a high-resolution timer value

a timer value, not related to the time of day and not subject to clock drift. The value is expressed in nanoseconds.
struct tm* os_localtime ( struct tm *  result)

Gets the current Unix timestamp and adjusts it to local time.

resultPointer to a 'struct tm' where the result should be placed
A pointer to a 'struct tm' in the current time zone (the 'result' argument) or NULL in case of error
struct tm* os_localtime_r ( const time_t *restrict  clock,
struct tm *restrict  result 

Portable version of POSIX localtime_r()

NULL in case of error
void os_microdelay ( uint64_t  us,
bool  ignoreinput 

Sleeps for us microseconds.

usNumber of microseconds to sleep.
ignoreinputIf true, ignore all input (including SIGINT/CTRL-C). If false, waiting is aborted on any input.
Timestamp os_time ( void  )

Obtains the current Unix timestamp.

Seconds since epoch.
void time_init ( void  )

Initializes the time module.